How to create a staked ORDERED area chart in d3.js?

66 Views Asked by At

I'm trying to create a stacked ordered area chart (emphasis on "ordered") in D3.js.

My current chart is unordered and looks like this:

enter image description here

But I'm trying to create something more like this (copied from https://datavizproject.com/data-type/stacked-ordered-area-chart/):

enter image description here

In my example (the one with the horrible colors), the blue area should start at the top of the stack and end in the middle. I'm not sure if d3.js's "stacked area chart" is the best way to approach the problem. Am I barking up the wrong tree here?

UPDATE:

I ended up hacking one together with d3 and python using area plots (ignore the axes, they're just for general magnitude reference):

enter image description here

0

There are 0 best solutions below