Negative numbers and stacked chart

Hi all,

I noticed that plotly doesn’t have the same behaviour for negative numbers as say Excel. If I just take the stacked bar chart example in the link below.

If you change the y values for trace2 to be negative, it starts drawing from the end of trace1 rather than from the x-axis. Does anyone have any idea how to make it draw from x-axis?

Thanks

If you change barmode as ‘relative’ instead of ‘stack’ it will start plotting negative Y values in the opposite direction.

2 Likes