Skip to main content
100%

Bubble Chart with Tooltips Using D3

✓ Published5🌍 Public
OOlha
Last edited Sep 3, 2026
Created on Mar 1, 2022
Forked from Heatmap with D3

This bubble chart uses D3 v7 to visualize bike station locations in the Bay Area, mapping latitude and longitude to axes, dock counts to bubble size, and cities to categorical colors from `d3.scaleOrdinal`. A legend, built with the d3-legend library, identifies city colors. Interactive tooltips, styled via CSS and positioned with mouse events, display the total bike count and city name for each aggregated data point. The chart renders as SVG and loads data from a remote CSV using `d3.csv`.

AI-generated description

Assignment 5 parts C, A

Bubble Chart with Tooltips and Legend Using D3

I've made a fork of my regular Bubble chart to add tooltip as I found it good to have information shown in a diggerent way.

Inspired by: https://observablehq.com/@d3/bubble-chart https://www.d3-graph-gallery.com/bubble Used lib: https://d3-legend.susielu.com/ used documentation: https://github.com/d3/d3/blob/main/API.md

Data: https://gist.githubusercontent.com/olga-kondr/64dc8df90513ada23e183cbb9fa1f9d4/raw/a69aa9c03948a74bb7453bdbcc7a3c70d81d9d9e/weather.csv

Simple version of this bubble chart without tooltip and legend: https://vizhub.com/olga-kondr/c38fbd86a8d343e8a5c83251a0ff4f71

MIT Licensed

Similar vizzes