Viewing a saved revision (read-only)
2597ab0fd98d4b1d843f7cfbeb4becb7
Activity 1_question 1.1
This bar chart displays the population of ten countries in the year 2000, using a horizontal layout where bar length encodes population and bar position encodes country name. Built with React and D3 v5, it uses `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis, rendering SVG rectangles via the custom `Marks` component. Axis components generate tick lines and labels, with tick text styled blue and marks filled light green. Data is loaded asynchronously from a CSV file using D3's `csv` function, and the x-axis labels are formatted using D3's `format` function to abbreviate large numbers with '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.