Skip to main content
100%

Stacked bar chart with negative values

✓ Published0🌍 Public
LLittledevil7
Last edited Aug 3, 2020
Created on Aug 3, 2020

This stacked bar chart visualizes positive and negative values across six months from a CSV file, with each bar divided by category and color. The chart uses a diverging layout where positive segments extend rightward from a zero baseline and negative segments extend leftward, anchored by the axis. Built with D3 v5, it employs `scaleLinear`, `scaleBand`, `d3.stack`, and `axisLeft`/`axisBottom` to compute and render the SVG. The data is split into positive and negative stacked series, with zero-baseline positioning calculated from value ranges.

AI-generated description

Stacked bar chart with negative values.

MIT Licensed

Similar vizzes