Skip to main content
100%

activity6_task1 question

✓ Published1🌍 Public
Ppuppireddyarchana@gmail.com
Last edited Apr 7, 2025
Created on Apr 7, 2025
Forked from Hello VizHub

This example shows the population of the top 10 countries in the year 2000 as a horizontal bar chart, using D3 v7 to render SVG elements. The data is loaded asynchronously from a CSV file via `d3.csv`, sorted in descending order, and then visualized with `d3.scaleBand` for the categorical country axis and `d3.scaleLinear` for the population scale. The bars are drawn with `rect` elements using the `Marks` component, while the axes are generated with `d3.axisBottom` and `d3.axisLeft`. The chart is configured with a fixed SVG size and defined margins.

AI-generated description
MIT Licensed

Similar vizzes