Skip to main content
100%

Activity6_Ques1(2)

✓ Published0🌍 Public
Nnithinnc@outlook.com
Last edited Apr 11, 2024
Created on Apr 11, 2024

This example displays a horizontal bar chart of population data for 20 countries in the year 2000, using blue rectangular marks with a blue axis line and gray tick labels. The React app loads CSV data from a GitHub repository via the `csv` function from d3.v5, processes the population column by multiplying by 1000, and renders the visualization as SVG. It employs `scaleBand` for the categorical country axis, `scaleLinear` for the numeric population axis, and custom React components—`AxisBottom`, `AxisLeft`, and `Marks`—to generate the ticks and bars, with a tooltip showing formatted values on hover.

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