Skip to content

LinePath + AreaClosed - resolve conflict #1411

Answered by hshoff
moon-sam asked this question in Q&A
Discussion options

You must be logged in to vote

HI @moon-sam, just need to remove the fill on the <LinePath />:

          <AreaClosed<AppleStock>
            data={stock}
            x={(d) => dateScale(getDate(d)) ?? 0}
            y={(d) => stockValueScale(getStockValue(d)) ?? 0}
            yScale={stockValueScale}
            fill="url(#area-gradient)"
            curve={curveMonotoneX}
          />
          <LinePath<AppleStock>
            data={stock}
            x={(d) => dateScale(getDate(d)) ?? 0}
            y={(d) => stockValueScale(getStockValue(d)) ?? 0}
            strokeWidth={3}
            stroke="blue"
            curve={curveMonotoneX}
          />

https://codesandbox.io/s/async-sun-hsmsv?file=/Example.tsx:4306-4899

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@moon-sam
Comment options

Answer selected by moon-sam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants