Making a bar chart
✓ Published0🌍 Public
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 descriptionA Minimal Example illustrating the basic structure of a Vizhub visualization.
MIT Licensed