Skip to main content
100%

Task_1_Question_1

✓ Published0🌍 Public
Ddaneeshchowdary18@gmail.com
Last edited Apr 4, 2024
Created on Apr 4, 2024
Forked from Hello VizHub

This visualization displays the populations of the ten most populous countries in the year 2000 as a horizontal bar chart. It loads data from a CSV file via a custom `useData` hook, using D3’s `csv` parser to format values. The chart renders with SVG and React, mapping country names to a D3 `scaleBand` on the y-axis and population values to a `scaleLinear` on the x-axis. Axes are drawn by custom components `AxisBottom` and `AxisLeft`, while `Marks` renders each bar as a `rect` with a tooltip. Tick formatting converts large numbers to abbreviated strings like “1.2B” via D3’s `format` function.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes