Skip to main content
100%

jasplund3

✓ Published1🌍 Public
JJohn Asplund
Last edited Jan 18, 2020
Created on Jan 17, 2020

This example visualizes a running total over time as a bar chart, displaying a cumulative count that grows from 5 in 1949 to nearly 15,000 by 2019. The chart uses SVG rendering and the D3 v5 library, with `d3.scaleBand` for the categorical year axis and `d3.scaleLinear` for the numeric total axis. The code constructs the visualization by appending rect elements to an SVG group, and it customizes the x-axis ticks to show only every third year using `d3.timeYear.every(3)` and a filter that removes non-matching tick labels. The data is loaded from a CSV file containing year and running_total columns.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes