Skip to main content
100%

Horizontal Bar Chart with D3 V4

✓ Published0🌍 Public
CChandrakantThakkarDigiCorp
Last edited Jul 1, 2017
Created on May 25, 2017

A grouped horizontal bar chart displays runs scored per over for a single team, with each bar’s length mapped to the value and color from a categorical scale. Built with D3 v4, it uses `d3.scaleBand` for the y-axis grouping and `d3.scaleLinear` for the x-axis, while `d3.scaleOrdinal` assigns colors. The SVG chart animates on window resize by clearing and redrawing, with a legend generated via jQuery. Data comes from an inline array, and the rendering uses SVG rectangles.

AI-generated description

Similar vizzes