Skip to content

Display positive/negative values on a stacked bar chart? #1624

Answered by williaster
djasnowski asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! Yes see this issue/discussion #291

tl;dr you need to set stack="diverging and probably update your y-scale domain logic. Your sandbox didn't have any negative values, but here's one that does (note the y-scale domain logic isn't technically correct/could use improvements)

https://codesandbox.io/s/naughty-aryabhata-y7s051?file=/Example.tsx

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by djasnowski
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