Skip to main content
100%

Simple d3.js bar chart

✓ Published0🌍 Public
PPatrick Wojda
Last edited May 11, 2020
Created on May 11, 2020

This simple d3.js bar chart displays monthly values over a two-year period, with each bar representing a data point from a CSV file. The visualization uses d3.scale.ordinal and d3.scale.linear to map categorical dates and quantitative values, respectively, to pixel positions. Axes are rendered with d3.svg.axis, while the bars themselves are drawn as SVG rectangles with a steelblue fill. The chart includes a navigation interface with circular arrow buttons and a detail area, though the interaction logic is incomplete. Data comes from the external file bar-data.csv, and the visualization is built using the D3 version 3.5.17 library.

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.

forked from <a href='http://bl.ocks.org/d3noob/'>d3noob</a>'s block: <a href='http://bl.ocks.org/d3noob/8952219'>Simple d3.js bar chart</a>

mit Licensed

Similar vizzes