How to create relative stacked area/line chart

Trying to create a stacked area/line chart where the chart readjusts or recalculates when you hide/show one of the series. This is how the stacked bar charts work.

See https://github.com/plotly/plotly.js/issues/1217 for more info on the topic