Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Bubble Charts

Signature

sp.bubble(title, x_values, y_values, sizes, *, variant="basic", categories=None, labels=None, color_values=None, **kwargs) -> Chart

Description

sp.bubble() is the unified entry point for the entire bubble-chart family. The variant keyword selects the rendering strategy — all other arguments remain consistent across variants. A bubble chart extends a 2D scatter plot with a third numeric dimension represented as bubble area (not radius), following best practices for perceptual accuracy.

Parameters

ParameterUsed by variants
categoriescategorical, labeled, outlined
color_hexbasic, labeled, negative, outlined
color_highgradient, negative
color_lowgradient, negative
color_valuesgradient
gridlinesall
hoverall
labelsbasic, deluxe, gradient, labeled, negative, outlined, plasma
palettecategorical, labeled, outlined
sizesgradient, negative
stroke_widthbasic, categorical, gradient, labeled, negative, outlined
titleall
widthcategorical, gradient, negative, outlined
x_labelall
x_valuesall
y_labelall
y_valuesall

Returns

Chart — object with .html property and .show() method.