π Public
Activity6_Task 1
This example shows a horizontal bar chart of 2020 population estimates for 30 countries, sorted by country name. The visualization uses a green fill for bars and blue axis ticks, with a formatted axis label reading "POPULATION-2020". The React app loads CSV data via the `csv` function from `d3`, converts the population column to numbers, and slices the top 30 rows for display. It renders an SVG using `scaleBand` for the categorical y-axis and `scaleLinear` for the continuous x-axis, with custom tick formatting converting large numbers to abbreviated forms like "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.
MIT Licensed
Comments
Sign in to join the discussion.