Skip to main content
100%

Activity 6 - Task 2

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

This example displays a horizontal bar chart of the top 20 countries by 2010 population, with a formatted x-axis using SI units to abbreviate large numbers. It loads the data from a CSV file using D3's `csv` function and renders the visualization as SVG elements within a React component. The code constructs the chart using D3's `scaleBand` and `scaleLinear` for axes, while custom `AxisBottom`, `AxisLeft`, and `Marks` components generate the ticks and bars, with tooltips showing the exact population values.

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