Activity 6 Question 4
✓ Published0🌍 Public
A bubble chart visualizes the relationship between GDP per capita on the x-axis, GDP on the y-axis, and population as the circle’s radius for 20 countries. Each bubble is colored by continent using a d3.scaleOrdinal with the d3.schemeCategory10 palette. The code employs d3.scaleLinear for both axes and d3.scaleSqrt for the radius. SVG rendering displays the circles with a predefined margin and stroke, with data embedded directly in the script.
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