Fork of activity6_task1 Q1
✓ Published0🌍 Public
This example displays the population of ten countries in the year 2000 as a horizontal bar chart, with country names on the y-axis and population counts on the x-axis. The bars are rendered as green SVG rectangles using React's JSX, with axis ticks generated by the `AxisBottom` and `AxisLeft` components. The chart loads its data from a CSV file using the `d3.csv` function and scales the axes with `d3.scaleBand` and `d3.scaleLinear`. Tooltip text is provided via the `d3.format` function, which also customizes the x-axis tick labels to show 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