Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6_Q1

Public visualization

Viewing a saved revision (read-only)

aa6907f8d4ee49daa32bbeb621f163ee

Activity 6_Q1

0 stars0🌍 Public
Mm.maanvireddt761@gmail.com
Last edited Oct 20, 2024
Created on Oct 20, 2024
Forked from Activity 6

This example shows a horizontal bar chart of the populations of 20 countries in 2010, with a green fill for each bar and a tooltip displaying the formatted population value. The chart uses React to render SVG elements, with D3’s `scaleBand` and `scaleLinear` for positioning and the `format` function to abbreviate tick labels (e.g., “1.2B”). Data is loaded from a CSV via D3’s `csv` function, and custom `AxisBottom`, `AxisLeft`, and `Marks` components generate the chart’s axes and rectangles.

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.