Skip to main content
100%

D3 Charts

✓ Published0🌍 Public
SSubhamChhetri
Last edited Feb 23, 2023
Created on Feb 20, 2023
Forked from Bar Chart

This example presents several D3 chart types—an animated bar chart, a grouped bar chart with a legend, and a stacked bar chart—with controls for interacting with the data. The animated bar chart uses a D3 module pattern with a reusable `barGraph` function, including scale bands, grid lines, transitions, and sorting capabilities. The grouped and stacked bar charts use D3’s `.stack()` and `.scaleBand()` to display categorical data from a CSV file, with each subgroup assigned a distinct color. The visuals are rendered in SVG and canvas, and the graph modules are composed in a single HTML document with a menu for switching between chart views.

AI-generated description
MIT Licensed

Similar vizzes