Skip to main content
100%

Activity_7_Task1

✓ Published0🌍 Public
Ssreekarthanda@gmail.com
Last edited Jul 21, 2023
Created on Jul 18, 2023
Forked from Hello VizHub

This example shows a horizontal bar chart comparing the 2020 populations of twenty countries, using D3 v5 scales and React components to render an SVG visualization. The chart maps country names to a band scale on the y-axis and population values to a linear scale on the x-axis, with green bars representing each value. The code explicitly uses `scaleBand`, `scaleLinear`, `max`, and `format` from D3, while React components like `AxisBottom`, `AxisLeft`, and `Marks` handle the rendering. Population values are formatted with the `.2s` specifier, replacing ‘G’ with ‘B’, and the data is fetched from a CSV URL and parsed with `csvParse`.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes