williaster/data-ui

StackedBarChart negative values

beacoding opened this issue · 1 comments

react-dom.development.js:2912 Error: <rect> attribute height: A negative value is not valid. ("-3.8790836274461924")

Cannot seem to have y values that are negative in bar charts. Is this expected? I was hoping to be able to do something like this https://www.highcharts.com/demo/column-negative

hey @biancasubion, this should definitely be supported I agree.

I think this will require some refactoring to use vx's Stack shape instead of BarStack, which exposes a offset="diverging" hook for this purpose.

PRs are welcome, otherwise I can probably get to it in the next week or so.