Fork of Actvity6_question1.2
✓ Published0🌍 Public
This example displays a horizontal bar chart of population figures for 20 countries in 2010, with country names on the y-axis and population values on the x-axis using a linear scale. It loads data from a remote CSV file via D3’s `csv` function and renders the chart as SVG in React using local components for axes and marks. The bars are colored teal, and hovering reveals formatted population values via SVG `<title>` tooltips. The code imports `scaleBand`, `scaleLinear`, and `format` from `d3` to handle scaling and tick labeling.
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