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
| Parameter | Used by variants |
|---|---|
center_subtext | kpi, nested, proportional |
center_text | kpi, nested, proportional |
donut | nested, proportional, subplots |
gridlines | proportional |
height | nested, proportional, subplots |
hover | proportional |
labels | nested, proportional, subplots |
legend_position | proportional |
min_label_frac | proportional |
palette | proportional, subplots |
pattern | proportional |
proportional | proportional, subplots |
pull | basic, donut, exploded, kpi, pattern, proportional, semi |
secondary_labels | nested, proportional |
secondary_values | nested, proportional |
series | proportional, subplots |
show_pct | proportional |
sort_order | proportional |
subplot_cols | proportional, subplots |
subplot_titles | proportional, subplots |
title | nested, proportional, subplots |
values | exploded, kpi, nested, proportional |
variant | proportional |
width | nested, proportional, subplots |
x_label | proportional |
y_label | proportional |
Returns
Chart — object with .html property and .show() method.