Activity-6-Task1.1
✓ Published0🌍 Public
This example shows a horizontal bar chart ranking the population of ten countries in the year 2000, with the chart reading from top to bottom and using SVG rendering within a React application. Population values are displayed along the x-axis using a `scaleLinear` with d3 formatting to abbreviate large numbers, while country names are plotted on the y-axis via a `scaleBand`. The chart is built by composing local React components, `AxisBottom`, `AxisLeft`, and `Marks`, and it loads data from a CSV file using `d3.csv` in a custom `useData` hook. Axis ticks are styled blue, and the bars appear in light green.
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