Bar Charts
Signature
sp.bar(title, labels=None, values=None, *, variant="basic", series=None, **kwargs) -> Chart
Description
sp.bar() is the unified entry point for the entire bar-chart family. The variant keyword selects the rendering strategy — all other arguments remain consistent across variants.
Parameters
| Parameter | Used by variants |
|---|---|
bar_gap | grouped_stacked, relative |
bargroup_gap | grouped_stacked |
category_labels | grouped, grouped_stacked, marimekko, multicategory, relative |
color_groups | basic |
color_hex | basic, deluxe, pictogram, prism |
corner_radius | grouped_stacked, relative |
gridlines | basic, deluxe, grouped, grouped_stacked, marimekko, multicategory, prism, relative |
height | all |
hover | basic, deluxe, grouped, prism |
icon_size | pictogram |
labels | basic, deluxe, pictogram, prism |
legend_position | grouped, grouped_stacked, marimekko, multicategory, relative |
max_icons_per_column | pictogram |
offset_groups | grouped_stacked |
orientation | grouped |
palette | all |
series | grouped, grouped_stacked, marimekko, multicategory, relative |
show_text | basic, deluxe, grouped, marimekko, prism |
sort_order | basic, grouped |
super_categories | multicategory |
title | all |
unit_description | pictogram |
units_per_icon | pictogram |
values | basic, deluxe, multicategory, pictogram, prism |
width | all |
widths | marimekko |
x_label | basic, grouped, grouped_stacked, marimekko, multicategory, relative |
y_label | basic, grouped, grouped_stacked, marimekko, multicategory, relative |
Returns
Chart — object with .html property and .show() method.