Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6-Question1.2

Public visualization

Viewing a saved revision (read-only)

096694f7ba064dce826426c01c26156c

Activity6-Question1.2

0 stars0🌍 Public
Aaashishvinayvasala@gmail.com
Last edited Apr 15, 2024
Created on Apr 15, 2024

This example presents a horizontal bar chart comparing the populations of twenty countries using data from a CSV file, with bars colored green and labeled axes. The visualization is built with React and D3 v5, using `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. The `Marks` component renders SVG rectangles for each bar, while `AxisBottom` and `AxisLeft` generate the ticks and labels. Population values are formatted using `d3.format` with a custom tick format that converts billions.

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.