-
-
Notifications
You must be signed in to change notification settings - Fork 267
"Stack" vs "Relative" barmode #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for bringing this to my attention! I'll look into it shortly, but right now I can't seem to find any |
Tracking in plotly/documentation#926 |
Great, thanks. I'm no sure whether what I encountered was official docs but, FWIW, I did see a specification of |
Also, thanks to your issue, we finally resolved plotly/documentation#926 such that |
Edit: this is the longstanding issue that was resolved plotly/documentation#202 |
@nicolaskruchten Super! Thanks -- both for making and releasing the change, and for doing all the prerequisite sifting. |
Hi There,
First off, thanks for making and open-sourcing this library; it is proving very useful.
I wanted to propose a tiny code change to 2 lines in the instantiation of the plotly renderers in PlotlyRenderes.jsx. Specifically, I'm wondering if the layout options passed into the two stacked bar charts could specify
{ barmode: 'relative' }
instead of{ barmode: 'stack' }
.There may be reasons not to do it, which I'm not aware of, because I'm far from intimately familiar with plotly.js. However, the reason pro doing it is that currently, with
{ barmode: 'stack' }
, if there are any negative values in the data, their bars end up overlapping and covering up other bars instead of sticking out on the negative side of the chart. In other words, as far as I can tell, when there are negative values, 'stack' mode results in a bug while 'relative' mode does what you'd expect. And I don't think there's a case where the opposite is true.The only discussion I've found about this so far is this forum post in which someone points out this issue and Etienne addresses by creating the new
{ barmode: 'relative' }
. However, no explanation is given as to why a new mode was needed instead of modifying the 'stack' mode.Thanks for your consideration.
The text was updated successfully, but these errors were encountered: