Skip to main content
100%

Grouped bar chart v4

✓ Published0🌍 Public
RRemiFaure
Last edited Jan 29, 2018
Created on Jan 29, 2018

This example presents a grouped bar chart with ten categorical groups along the x-axis and five colored series per group, using randomly generated data. The SVG visualization uses D3 v4’s `d3.scaleBand` for both the outer group positions and inner bars, with `d3.scaleLinear` mapping values from 0 to 1 to the vertical axis. Each series is assigned a distinct color via `d3.scaleOrdinal`, and the bars are rendered as nested `<g>` elements with `rect` shapes. The code includes axes with hidden x-axis path, and the layout is fixed at 960 by 500 pixels with defined margins.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/romsson/'>romsson</a>'s block: <a href='http://bl.ocks.org/romsson/2f94c1913b81f7fd20c530236934433a'>Grouped bar chart v4</a>

mit Licensed

Similar vizzes