🌍 Public
Task8_Q1
This example displays a horizontal bar chart of the population of ten countries for the year 2000, with bars sorted by country name and a blue axis line. The visualization uses React and D3 v5 to render SVG marks; `d3.scaleBand` and `d3.scaleLinear` map the categorical and quantitative variables, while axes are built from custom modules. Population data is loaded as CSV from a remote repository, with values scaled by a thousand. The chart includes interactivity via native SVG `<title>` tooltips that format tick values with `d3.format`.
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.