Skip to content
\n

and show how you would make the strokes from point 1 to point 2 and from point 2 to point 3 have different gradients? Feel free to define new gradients if needed.

","upvoteCount":1,"answerCount":2,"acceptedAnswer":{"@type":"Answer","text":"

here you go https://codesandbox.io/p/sandbox/area-chart-filled-by-sign-forked-72qtk2

\n

You'll need to associate colors to your data and re-calculate offset every time a datapoint is added. You'll have a stop per datapoint with the first always being 0 and the last always being 100

\n

\"image\"

","upvoteCount":3,"url":"https://github.com/recharts/recharts/discussions/4925#discussioncomment-10454665"}}}
Discussion options

You must be logged in to vote

here you go https://codesandbox.io/p/sandbox/area-chart-filled-by-sign-forked-72qtk2

You'll need to associate colors to your data and re-calculate offset every time a datapoint is added. You'll have a stop per datapoint with the first always being 0 and the last always being 100

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@cernanb
Comment options

@ckifer
Comment options

Answer selected by cernanb
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