Skip to main content
100%

Barchart Tutorial

✓ Published0🌍 Public
Aahemdalssafi
Last edited Sep 14, 2022
Created on Sep 12, 2022
Forked from Hello VizHub

This example shows a horizontal bar chart of amounts per person, with red bars scaled linearly along the x-axis and categorical names on a band scale along the y-axis. The visualization renders as SVG using D3 v5, loading data from a local CSV file via `d3.csv` and converting the numeric amounts with `+d.amounts`. Scales, axes, and rectangles are created with `d3.scaleLinear`, `d3.scaleBand`, `d3.axisLeft`, and `selection.enter().append('rect')`, with margins applied through a group transform.

AI-generated description
MIT Licensed

Similar vizzes