Skip to main content
100%

Activity-6-Question-1.2

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

This example displays a horizontal bar chart comparing the populations of 20 countries in 2010, rendered as SVG within a React application. The chart uses D3 scale functions, `scaleBand` for the y-axis and `scaleLinear` for the x-axis, with population values read from a CSV file. Axes are custom components that render ticks and labels, while bars include native SVG tooltips showing formatted population values. The code loads data via `d3.csv` and formats tick labels using `d3.format`.

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