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

Pie Charts

Signature

sp.pie(title, labels=None, values=None, *, variant="basic", series=None, **kwargs) -> Chart

Description

sp.pie() is the unified entry point for the entire pie-chart family. The variant keyword selects the rendering strategy — all other arguments remain consistent across variants.

Parameters

ParameterUsed by variants
center_subtextkpi, nested, proportional
center_textkpi, nested, proportional
donutnested, proportional, subplots
gridlinesproportional
heightnested, proportional, subplots
hoverproportional
labelsnested, proportional, subplots
legend_positionproportional
min_label_fracproportional
paletteproportional, subplots
patternproportional
proportionalproportional, subplots
pullbasic, donut, exploded, kpi, pattern, proportional, semi
secondary_labelsnested, proportional
secondary_valuesnested, proportional
seriesproportional, subplots
show_pctproportional
sort_orderproportional
subplot_colsproportional, subplots
subplot_titlesproportional, subplots
titlenested, proportional, subplots
valuesexploded, kpi, nested, proportional
variantproportional
widthnested, proportional, subplots
x_labelproportional
y_labelproportional

Returns

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