Skip to main content
100%

Simple d3.js bar chart

✓ Published0🌍 Public
Dd3noob
Last edited Nov 30, 2019
Created on Feb 12, 2014

This bar chart displays monthly values from January 2013 through February 2014, with each bar’s height representing a numeric amount. It uses d3.csv to load data from the bar-data.csv file, d3.time.format to parse dates, and d3.scale.ordinal with rangeRoundBands to position bars along the x-axis. The chart renders as SVG, using d3.svg.axis for the rotated x-axis labels and a linear y-axis, with steelblue rectangles drawn via d3.selectAll and .enter().append. The y-axis is labeled “Value ($).”

AI-generated description

This is a d3.js bar chart as used as an example in the book D3 Tips and Tricks.

It is derived from the Mike Bostock's Bar Chart example but it is a slightly cut down version.

mit Licensed

Similar vizzes