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

Lollipop Chart 3D

Signature

sp.build_lollipop3d_chart(
    title: str,
    labels: list[str],
    values: list[float],
    *,
    color_hex: int = 0x6366F1,
    palette: list[int] | None = None,
    bg_color: str = "#1a1a2e",
    width: int = 900,
    height: int = 600,
    x_label: str = "",
    y_label: str = "",
    z_label: str = "",
    show_text: bool = False,
) -> Chart

Aliases: sp.lollipop3d


Description

3D lollipop chart — stems and spheres rendered in a WebGL scene.


Parameters

ParameterTypeDefaultDescription
titlestrrequiredChart title
labelslist[str]requiredCategory labels
valueslist[float]requiredValues per category
color_hexint0x6366F1Stem and sphere color
palettelist[int] | NoneNonePer-category colors
bg_colorstr"#1a1a2e"Background color
widthint900Canvas width
heightint600Canvas height
show_textboolFalseShow value labels

Returns

Chart


Examples

import seraplot as sp
chart = sp.build_lollipop3d_chart(
    "Monthly Sales 3D",
    x_values=[1.0, 2.0, 3.0, 4.0, 5.0],
    y_values=[0.0, 0.0, 0.0, 0.0, 0.0],
    z_values=[120.0, 95.0, 140.0, 110.0, 160.0],
)
const sp = require('seraplot');
const chart = sp.build_lollipop3d_chart("Monthly Sales 3D",
[1.0, 2.0, 3.0, 4.0, 5.0],
[0.0, 0.0, 0.0, 0.0, 0.0],
{
    z_values: [120.0, 95.0, 140.0, 110.0, 160.0]
})
import * as sp from 'seraplot';
const chart = sp.build_lollipop3d_chart("Monthly Sales 3D",
[1.0, 2.0, 3.0, 4.0, 5.0],
[0.0, 0.0, 0.0, 0.0, 0.0],
{
    z_values: [120.0, 95.0, 140.0, 110.0, 160.0]
})
▶ Live Preview

See also

Signature

sp.build_lollipop3d_chart(
    title: str,
    labels: list[str],
    values: list[float],
    *,
    color_hex: int = 0x6366F1,
    palette: list[int] | None = None,
    bg_color: str = "#1a1a2e",
    width: int = 900,
    height: int = 600,
    x_label: str = "",
    y_label: str = "",
    z_label: str = "",
    show_text: bool = False,
) -> Chart

Aliases: sp.lollipop3d


Description

Graphique en sucette 3D — tiges et sphères rendus dans une scène WebGL.


Paramètres

ParamètreTypeDéfautDescription
titlestrrequisTitre du graphique
labelslist[str]requisÉtiquettes des catégories
valueslist[float]requisValeurs par catégorie
color_hexint0x6366F1Couleur des tiges et sphères
palettelist[int] | NoneNoneCouleurs par catégorie
bg_colorstr"#1a1a2e"Couleur de fond
widthint900Largeur du canvas
heightint600Hauteur du canvas
show_textboolFalseAfficher les étiquettes de valeur

Retourne

Chart


Exemples

import seraplot as sp

chart = sp.build_lollipop3d_chart(
    "Ventes mensuelles 3D",
    x_values=[1.0, 2.0, 3.0, 4.0, 5.0],
    y_values=[0.0, 0.0, 0.0, 0.0, 0.0],
    z_values=[120.0, 95.0, 140.0, 110.0, 160.0],
)

Voir aussi