Skip to main content

View Live Example

See bubble charts in action with interactive examples

Overview

Bubble charts are powerful scatter plots where the size of each point (bubble) represents a third dimension of data. They excel at visualizing relationships between three continuous variables simultaneously, making them perfect for market analysis, performance dashboards, and multi-dimensional data exploration.

Basic Bubble Chart

Create a simple bubble chart with three data dimensions:

Color Mapping

Add categorical grouping with color encoding:

Bubble Sizing

Size Range Control

Control the minimum and maximum bubble sizes for typical data:

Size Guide in Legend

New in v1.10.0: Add a visual size guide to your legend showing min, mid, and max bubble sizes!
Provide a title parameter to geomBubble() to automatically display a bubble size guide in the legend:
Size Guide Features:
  • Visual Reference: Shows three bubbles (min, mid, max) with actual data values
  • Automatic Scaling: Values and sizes match your data and scale configuration
  • Layout Aware: Adapts to horizontal or vertical legend positioning
  • Integrated: Works seamlessly with existing legend items and color keys
Example with Custom Legend Position:

Advanced Bubble Sizing

For precise control over the scale domain and visual presentation, use both limits and minSize/maxSize:
In this example:
  • minSize/maxSize control how bubbles appear visually (10-40 pixel radius)
  • limits set the scale’s reference range: deals at 50Kget10pxradius,dealsat50K get 10px radius, deals at 1M get 40px radius
  • All deals still render - deals outside limits are scaled proportionally (e.g., $2M deal gets 80px radius)
  • Deals within the limits range will be scaled linearly to the visual size range
Important: Outlier Behavior
  • Without limits: Scale domain uses actual data range, so minSize/maxSize map to actual min/max data values
  • With limits: Scale domain is set to limits; values outside limits still render, scaled proportionally beyond minSize/maxSize
  • This preserves data accuracy - all values render, with outliers appearing larger/smaller than the reference range
  • Use limits to set a consistent scale domain across multiple charts, not to filter data

Dynamic Size Scaling

Use a slider or control to adjust bubble sizes dynamically:

Bubble Styling

Shape Options

Customize bubble shapes:
Available shapes:
  • PointShape.circle (default)
  • PointShape.square
  • PointShape.triangle

Advanced Styling

Labels and Text

Bubble Labels

Add labels to bubbles:

Custom Label Positioning

Scale Customization

Axis Formatting

Format axis labels for better readability:

Size Scale Optimization

Ensure meaningful size differences:

Interactive Features

Rich Tooltips

Create informative hover tooltips:

Click Interactions

Handle bubble selection:

Animation

Entrance Animation

Animate bubbles appearing:

Smooth Animation

Customize animation timing and curves:

Dual Y-Axis Support

Use bubble charts with secondary Y-axis:

Market Analysis Example

Complete Dashboard

A comprehensive market analysis bubble chart:

Best Practices

  • Use bubble size for positive, quantitative variables
  • Keep size ratios between 2:1 and 5:1 for optimal perception
  • Ensure smallest bubbles are clearly visible (minimum 5-8px radius)
  • Consider area vs radius scaling based on your data distribution
  • Use alpha (transparency) for overlapping bubbles
  • Limit color categories to 6-8 for clarity
  • Add white borders to improve bubble separation
  • Consider colorblind-friendly palettes
  • For dense data, increase transparency and reduce size
  • Use tooltips instead of labels for cluttered charts
  • Consider data aggregation or filtering for very large datasets
  • Provide zoom/pan functionality for detailed exploration
  • Always include informative tooltips
  • Use consistent hover states
  • Consider click-through navigation to detail views
  • Provide size controls for user customization
  • For 500+ bubbles, reduce border width or disable borders
  • Use lower alpha values for better performance
  • Consider data virtualization for very large datasets
  • Test on different device sizes and performance levels

Common Use Cases

Market Analysis

Revenue vs customers with market share sizing

Portfolio Visualization

Risk vs return with position size bubbles

Performance Metrics

Multi-dimensional KPI dashboards

Scientific Data

Three-variable correlation analysis

Geographic Analysis

Population vs GDP with area sizing

Product Comparison

Price vs quality with popularity sizing

Next Steps

Scatter Plots

Basic two-dimensional point charts

Heat Maps

Matrix-based data visualization

Interactions

Add tooltips and click handlers

Animations

Smooth entrance and transition effects