All examples By author By category About

micahstubbs

stacking with a trendline and tooltips

##stacking with a trendline and tooltips

A #d3js stacked bar chart that supports a mix of positive and negative values.

Mouse over the trendline to see the sum of the positive and negative y-values encoded in the stacked bar areas.

A further iteration on the bl.ock barStack - stacking with negative values from ZJONSSON

The tooltips are adapted from the Stacked bar chart with tooltips bl.ock from mstanaland

An earlier version of this bl.ock without the trendline or bar sum tooltips is stacking with negative values