Skip to main content
100%

Tidied up Bubble Chart - CGPT Add on

✓ Published0🌍 Public
Hhquazza@gmail.com
Last edited Feb 3, 2025
Created on Feb 3, 2025

This example shows a bubble chart that aggregates total profit by region from a sales records CSV, with each bubble sized by accumulated profit and colored by region. The visualization uses D3 v7’s `d3.csv`, `d3.group`, `d3.pack`, and `d3.hierarchy` to structure and layout the data as packed circles, rendered as SVG. Interactive tooltips display country and profit details via HTML `div` elements, while labels appear inside each bubble. The chart is built in a plain JavaScript environment with a CSS-styled tooltip and hover opacity effects.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Added content = d3.csv (line 3)

Tooltip - create in html, add details in json See line 13 and line 44+ in js file;

MIT Licensed

Similar vizzes