🌍 Public
Viewing a saved revision (read-only)
d5b0a4ab02b940698fafc996a259d698
activity6_question1.2
This example shows a horizontal bar chart displaying the population of twenty countries from a CSV dataset for 2010, with a green fill for the bars and blue tick lines. It is implemented in React and D3 v5, using `scaleBand` and `scaleLinear` for the axes, while custom components like `AxisBottom`, `AxisLeft`, and `Marks` render the SVG elements. The code also imports the `format` function to abbreviate tick labels, converting values like 'G' to 'B' for billions.
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.