Skip to main content
100%

Bar Chart in D3 v5

✓ Published0🌍 Public
Aalex-rind
Last edited Feb 28, 2020
Created on Feb 28, 2020

This bar chart shows the frequency of each letter in the English language, using a TSV file parsed with d3-dsv and rendered as SVG rectangles. The x-axis uses d3.scaleBand for letter categories, while the y-axis uses d3.scaleLinear with percentage formatting via d3-format. Hovering a bar changes its fill to brown, and axes are generated with d3-axis. Data loading is handled asynchronously through d3.tsv, with values converted to numbers using d3-array.

AI-generated description

This simple bar chart is constructed from a TSV file storing the frequency of letters in the English language. The chart employs conventional margins and a number of D3 features:

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/3885304'>Bar Chart</a>

forked from <a href='http://bl.ocks.org/Golodhros/'>Golodhros</a>'s block: <a href='http://bl.ocks.org/Golodhros/6f8e6d1792416ee3770ff4ddd5c9594e'>Bar Chart in D3 v5</a>

gpl-3.0 Licensed

Similar vizzes