Description
I'm filing this issue as a gathering point for the feature request of real stacked area charts.
The current solution to create stacked area charts is to plot cumulative variables which has multiple drawbacks:
- Correct (i. e. non-cumulative) hover values have to be set manually by using
text: '...'
. - The resulting chart is incorrect if some traces are shown and others hidden (by clicking on legend items).
A real solution would be to have an argument like layout = {linemode: 'stack'}
, same as there is for bar charts.
I'm aware that @etpinard stated some time ago:
We are planning on adding area charts to our list of trace types at some point this year. You are not the first person to ask for this feature.
Therefore I hope opening this issue won't be seen as an annoying harassment! Since it is an often requested feature, I think it important to have a place for users like me to gather all relevant information and potential progress on this.
Some more information:
- relevant bug reports:
- Generating a stacked area chart in
ggplot2
and then converting it to plotly usingggplotly
doesn't work as supposed either (the plot doesn't get rescaled correctly if traces in between are unselected, there will just be space left). - proposed workaround by @etpinard (in
JS
): https://codepen.io/etpinard/pen/yOgdOb