🌍 Public
Viewing a saved revision (read-only)
15ab73f9d1f0447ba1378cb4a07862e4
Activity6_Question4
This example shows a bubble chart comparing beverage manufacturers by plotting glucose levels on the x-axis and ratings on the y-axis, with bubble size encoding calorie content and color distinguishing maker categories. The visualization uses d3.csv to load tabular data and d3.scaleLinear for the x, y, and bubble radius scales, while d3.scaleOrdinal assigns distinct colors to manufacturers. SVG circles are rendered with d3.selectAll and .join('circle'), and an interactive tooltip appears on mouseover using D3’s event handling. The chart includes labeled axes, a title, and legend ranges for the scales.
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.