✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Stacked area chart with groups below and above x axis(negative and positive values)

Hi, I am trying to create a stacked area chart with two groups of data that could be shown below and above x axis alternatively using negative and positive values.
Is there a way to do that with out any work arounds?

I have some ideas to how to do that:

1- draw the part below as negative values, I have tried but I can not achieve it, and according to other posts that I have found about negative values in stacked area it seems to be not possible right now with plotly, Is there any updates on that?

2- Use two mirrored Y axes below each other and use same X axis for both, then separate my data series in two groups and draw them with different Y axis, If it is possible? I have not tried that yet.

grateful for any answer!

My first solution works, I did not need to do any major changes comparing to having a stacked area with just positive values.

The trick was that I needed two different categories(stackgroups) one for positive values and one for negative values.

layout.barmode: “group”

yaxis.rangemode: “normal”

trace.stackgroup: “positive” or “negative”
trace.type : “stacked”