Axis chart with area graphs.
- Using Curves
- Stacking Advanced
In this example we are using the d2b
svgScatter generators together. If the chart consisted of a large number of points it may be best to just use the
svgLine generator to avoid cluttering the plane.
Here we will interpolate the area chart using the d3 module
curveBasis. You'll notice that the points no longer match up with the basis fit for each line.
You can stack the area charts by using the
stackBy property on the svg generators. In order to get the area, line, and scatter to be stacked to match each other they will all need to have the
stackBy property set.
stackBy property can be passed an accessor function in order to stack only some of the area charts together. In the example below, the blue and orange area charts are stacked together as
stack: 1 where as the green will be a separate stack as