🌍 Public
Viewing a saved revision (read-only)
3b5bdcca69ae48a9aec00992ddcc9628
Activity6_Tak1
This example displays a horizontal bar chart of population data for 20 countries, sourced from a CSV file of the 2010 census. The chart uses D3 version 5 and React, with bars encoded as rectangles whose lengths are scaled by the population value. Axis components are generated with D3’s scale and tick APIs, where x-axis ticks are formatted with a custom function and the y-axis labels use the domain values. The chart’s styling includes a green bar fill and a blue tick line, with a tooltip showing the raw population value on hover.
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.