BarStack With Negative Values
See original GitHub issueHow can I use <BarStack>
when one of the keys contains negative values?
I am trying to reproduce something that looks like:
Here’s a sandbox link which demonstrates my attempt at making the demo work with negative temperatures, but it doesn’t seem to work properly.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
BarStack With Negative Values #291 - airbnb/visx - GitHub
How can I use when one of the keys contains negative values? I am trying to reproduce something that looks like: Here's a...
Read more >stacking with negative values - Popular Blocks
A #d3js stacked bar chart that supports a mix of positive and negative values. An iteration on the bl.ock barStack - stacking with...
Read more >Stacked bar charts with negative values - Google Groups
Hi Guys,. All the examples I found cover stacked bars with only positive values. None covers stacked negative values (Excel ...
Read more >Combining stacked barchart (with negative values) with line ...
I plot 7 variables (some of which are negative most of the time) in the barchart with the "graph bar, stack" routine:.
Read more >Stacked barplot with negative values with ggplot2
This post explains how to build a stacked barplot with R and ggplot2. It considers a dataset that includes negative values to see...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My fault, I don’t think this is documented anywhere yet. Will add an example to gallery as well. But you need to use
<Stack />
and pass in an offset propoffset={'diverging'}
(d3 stack offset docs)Here’s a quick example based of your sandbox:
https://codesandbox.io/s/2pxzozmrlp
It seems BarStack is still not able to handle negative values in the latest version. The example provided back in 2018 seems to be broken if using the latest version. Would you happen to have an updated example for BarStack with negative values?