Skip to main content
100%

Activity6-Question1-1

✓ Published0🌍 Public
Ssowmyaammula.sdv@gmail.com
Last edited Apr 4, 2024
Created on Apr 4, 2024

This example shows a horizontal bar chart comparing the populations of ten countries in the year 2000, using data loaded from a CSV file. The visualization renders as an SVG within a React app, using D3 v5 APIs like `scaleBand` and `scaleLinear` to position bars and axes. Custom React components—`AxisBottom`, `AxisLeft`, and `Marks`—build the chart, with axis tick lines styled blue and bars filled light green. A native SVG `<title>` element provides tooltips on each bar, and population labels are formatted with `format('.2s')` to display abbreviations like "B" for 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.
MIT Licensed

Similar vizzes