Viewing a saved revision (read-only)
2e1b3670b3e544aaa4d3ae356613aa30
task 8
This visualization displays the population of ten countries in 2010 as a horizontal bar chart, with country names on the y-axis and population values on the x-axis. Population data is loaded from a remote CSV file using d3.csv, with the population field parsed and scaled by a factor of 1000. The chart is rendered as an SVG using React components, with d3.scaleBand for the categorical y-axis and d3.scaleLinear for the numeric x-axis. Axis components use d3 tick formatting with a custom function that converts values like "1.5G" to "1.5B". The bars include a native SVG title element for tooltips 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.