Closed
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. Of course this would need some under-the-hood work in plotly.js
first I guess.
Some more information:
- relevant bug reports:
plotly.js
: Stacked Area Functionality plotly.js#344plotly
forR
: Example code of stacked fill area #686
- 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). - workaround (in
JS
): https://codepen.io/etpinard/pen/yOgdOb
Metadata
Metadata
Assignees
Labels
No labels