Bar Chart IIc
✓ Published0🌍 Public
Mmbostock
Last edited Feb 23, 2016
Created on Nov 6, 2013
This example shows a basic horizontal bar chart, with each bar labeled by its value in white text. It uses D3 v3 to load tab-separated data from `data.tsv`, scales the bar widths with a linear scale, and appends SVG `<rect>` and `<text>` elements. The chart is rendered as an SVG with a fixed width, and the bar height is computed from the number of data rows. The `d3.tsv` method parses the data, and the `type` function coerces values to numbers before rendering.
AI-generated descriptionA basic bar chart. Part of the tutorial series Let’s Make a Bar Chart.
gpl-3.0 Licensed