🌍 Public
activity 6_Task 1 Q2
This example shows a horizontal bar chart ranking the populations of ten countries for the year 2000, with a green fill for each bar. Built with React and D3 v5, the visualization uses D3’s `scaleBand` for the categorical y-axis and `scaleLinear` for the numeric x-axis, while data is loaded from a remote CSV via `d3.csv`. The SVG rendering includes custom axes, tick formatting that abbreviates large numbers (e.g., "1.2B"), and a tooltip on each bar showing the formatted population value.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed
Comments
Sign in to join the discussion.