question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BarStack With Negative Values

See original GitHub issue

How can I use <BarStack> when one of the keys contains negative values?

I am trying to reproduce something that looks like: screen shot 2018-05-17 at 12 19 34 am

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:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
hshoffcommented, May 17, 2018

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 prop offset={'diverging'} (d3 stack offset docs)

Here’s a quick example based of your sandbox: screen shot 2018-05-17 at 11 31 02 am

https://codesandbox.io/s/2pxzozmrlp

3reactions
jackal-scratchcommented, Aug 22, 2019

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found