Skip to main content
Public

Share visualization

Loading preview…

Tidied up Bubble Chart - CGPT Add on

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Tidied up Bubble Chart - CGPT Add on

0 stars0Public
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;

Comments

Sign in to join the discussion.

MIT Licensed