task_1 sekhar
✓ Published0🌍 Public
This example displays a horizontal bar chart of 2020 population data for 30 countries, with country names on the y-axis and population on the x-axis. The visualization uses React with D3 v5, employing `scaleBand` and `scaleLinear` for positioning, while `AxisBottom`, `AxisLeft`, and `Marks` components render the SVG elements. Population values are parsed from a CSV file using `d3.csv` and formatted with `d3.format` to abbreviate large numbers (e.g., "1.2B"). The chart includes custom tick styling and a labeled x-axis; hovering over a bar triggers a native tooltip showing the formatted population value.
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