Task_8_Q1_2
✓ Published1🌍 Public
This example shows a horizontal bar chart of population figures for 20 countries in 2010, with each bar’s length encoding the population value and a native SVG `<title>` element providing a tooltip on hover. The visualization uses React components for rendering, with D3’s `scaleBand` and `scaleLinear` to position bars and axes, and the `format` API to abbreviate tick labels from billions to “B” notation. Data is loaded asynchronously via D3’s `csv` from a GitHub-hosted dataset, and the chart is drawn as SVG within a React app using `ReactDOM.render`.
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