Skip to main content
Scatter and bubble charts use cartesian coordinates to display values for two or more variables, making them ideal for showing relationships and correlations.

Scatter Charts

Scatter plots display values for two variables as points on a cartesian coordinate system.

Basic Scatter Chart

Scatter Chart Configuration

Key configuration options from ~/workspace/source/ts/Series/Scatter/ScatterSeriesDefaults.ts:42-137:
number
default:"0"
The width of the line connecting data points. Default is 0 (no line).
object
Marker options. Markers are always enabled for scatter charts.
object
Apply random displacement to help distinguish overlapping points.
string
default:"'xy'"
How to find the nearest point for tooltips. Can be ‘x’, ‘y’, or ‘xy’.

Jitter for Overlapping Points

When plotting discrete values, jitter helps distinguish overlapping points:

Bubble Charts

Bubble charts display three dimensions of data where the third dimension is represented by bubble size.

Basic Bubble Chart

Bubble Chart Configuration

number | string
default:"8"
Minimum bubble size. Can be a pixel value or percentage of the plot area.
number | string
default:"'20%'"
Maximum bubble size. Prevents bubbles from becoming too large.
string
default:"'area'"
Whether the bubble size should be relative to area or width.
number
The minimum for the Z value range. Defaults to the lowest Z value in the data.
number
The maximum for the Z value range. Defaults to the highest Z value in the data.

Multiple Bubble Series

Packed Bubble Chart

A special bubble chart type that packs bubbles without axes:

Marker Symbols

Customize marker appearance:

Use Cases

Scatter Charts

  • Correlation analysis
  • Distribution patterns
  • Outlier detection
  • Scientific data

Bubble Charts

  • Three-dimensional data
  • Portfolio analysis
  • Market positioning
  • Resource allocation

Data Formats

Scatter Chart Data

  1. Array of arrays: data: [[1, 2], [2, 3], [3, 1]]
  2. Array of objects: data: [{x: 1, y: 2, name: 'Point 1'}]

Bubble Chart Data

Bubble charts require x, y, and z values:
  1. Array of arrays: data: [[1, 2, 10], [2, 3, 20]] (x, y, z)
  2. Array of objects: data: [{x: 1, y: 2, z: 10, name: 'Bubble 1'}]
The z value in bubble charts represents the size. Larger z values create larger bubbles.
Too many overlapping bubbles can make the chart difficult to read. Consider using jitter or adjusting bubble sizes.