Skip to main content
100%

Stacked Negative Values

✓ Published0🌍 Public
TThanaporn-sk
Last edited Mar 11, 2017
Created on Mar 11, 2017

This diverging stacked bar chart displays quarterly fruit sales (apples, bananas, cherries, dates) with positive values rising above the x-axis and negative values descending below it, using the `stackOffsetDiverging` offset to separate the two groups. Built with D3 v4, the SVG visualization uses `d3.stack` with a custom offset function, `scaleBand` for the categorical month axis, and `scaleLinear` for the numeric y-axis. Each series is colored via `d3.scaleOrdinal` with the `schemeCategory10` palette, while axes are rendered with `d3.axisBottom` and `d3.axisLeft`.

AI-generated description

A diverging stacked bar chart, with negative values descending below the x-axis.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/b5935342c6d21928111928401e2c8608'>Stacked Negative Values</a>

gpl-3.0 Licensed

Similar vizzes