Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

activity 6_Task 1

Public visualization

Viewing a saved revision (read-only)

e56c6d05c5c94e2aa3cc5cace0fd8f63

activity 6_Task 1

0 stars0🌍 Public
Rrakesh.kavuru@outlook.com
Last edited Apr 4, 2024
Created on Apr 4, 2024
Forked from Hello VizHub

This example shows the population of 20 countries in 2010 as a horizontal bar chart, with country names on the y-axis and population values on the x-axis. The visualization uses React to render SVG elements, with D3 v5’s `scaleBand` and `scaleLinear` for positioning and a custom `tooltipFormat` that abbreviates large numbers. Data is loaded as CSV using `d3.csv` and sliced to the first 20 rows, while axis ticks are generated with `xScale.ticks()` and labeled via the `format` API.

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.