Skip to main content
100%

Making a bar chart

✓ Published1🌍 Public
Vvladvaculin
Last edited Aug 29, 2019
Created on Aug 27, 2019
Forked from Making a bar chart

This example demonstrates a horizontal bar chart comparing the area of major cities, using data loaded from a CSV file. The visualization positions each city along the y-axis and scales the bar lengths according to the area values. It relies on D3.js v5 APIs including `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to construct the chart. The SVG rendering uses a purple fill for bars, which changes to a lighter shade on hover, with the chart area defined by explicit margins.

AI-generated description
MIT Licensed

Similar vizzes