π Public
Activity6_Question1.2
This example shows a horizontal bar chart comparing the population of 20 countries, using data from a CSV file. The chart displays population values on the x-axis and country names on the y-axis, with a label indicating the data represents 2010 populations. The visualization is built with React and D3 v5, using `scaleBand` for the categorical y-axis, `scaleLinear` for the quantitative x-axis, and SVG rect elements to render the bars. Tooltips are implemented using native SVG title elements, showing formatted population values in 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.
MIT Licensed
Comments
Sign in to join the discussion.