Skip to main content
100%

Making a bar chart

✓ Published0🌍 Public
Vvkoschman
Last edited Jul 29, 2020
Created on Jul 29, 2020
Forked from Making a bar chart

This example shows a horizontal bar chart of population data for nine countries, ordered from China at the top to Russia at the bottom. The chart uses D3 v5’s `scaleLinear` for the x-axis, `scaleBand` for the categorical y-axis, and `axisLeft`/`axisBottom` to render tick marks. Data is loaded from a CSV file with `d3.csv`, and rectangles are appended to an SVG container with `selectAll('rect')`. A fixed margin layout positions the chart within a 960×500 viewport.

AI-generated description

A Minimal Example illustrating the basic structure of a Vizhub visualization.

MIT Licensed

Similar vizzes