Dumbbell Chart 3D
Signature
sp.build_dumbbell3d_chart(
title: str,
labels: list[str],
values_start: list[float],
values_end: list[float],
*,
color_start: int = 0x6366f1,
color_end: int = 0xf43f5e,
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.dumbbell3d
Description
Dumbbell chart in 3D — connects start and end spheres with a 3D tube.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
title | str | required | Chart title |
labels | list[str] | required | Category labels |
values_start | list[float] | required | Start values |
values_end | list[float] | required | End values |
color_start | int | 0x6366f1 | Start sphere color |
color_end | int | 0xf43f5e | End sphere color |
bg_color | str | "#1a1a2e" | Background |
width | int | 900 | Canvas width |
height | int | 600 | Canvas height |
show_text | bool | False | Show value labels |
Returns
Chart
Examples
import seraplot as sp
chart = sp.build_dumbbell3d_chart(
"Before vs After 3D",
labels=["Group A", "Group B", "Group C"],
values_start=[40, 55, 70],
values_end=[60, 75, 85],
)const sp = require('seraplot');
const chart = sp.build_dumbbell3d_chart("Before vs After 3D",
["Group A", "Group B", "Group C"],
[40, 55, 70],
{
values_end: [60, 75, 85]
})import * as sp from 'seraplot';
const chart = sp.build_dumbbell3d_chart("Before vs After 3D",
["Group A", "Group B", "Group C"],
[40, 55, 70],
{
values_end: [60, 75, 85]
})▶ Live Preview
See also
Signature
sp.build_dumbbell3d_chart(
title: str,
labels: list[str],
values_start: list[float],
values_end: list[float],
*,
color_start: int = 0x6366f1,
color_end: int = 0xf43f5e,
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.dumbbell3d
Description
Graphique haltère 3D — connecte les sphères de début et de fin avec un tube 3D.
Paramètres
| Paramètre | Type | Défaut | Description |
|---|---|---|---|
title | str | requis | Titre du graphique |
labels | list[str] | requis | Étiquettes des catégories |
values_start | list[float] | requis | Valeurs de départ |
values_end | list[float] | requis | Valeurs d'arrivée |
color_start | int | 0x6366f1 | Couleur de la sphère de départ |
color_end | int | 0xf43f5e | Couleur de la sphère d'arrivée |
bg_color | str | "#1a1a2e" | Couleur de fond |
width | int | 900 | Largeur du canvas |
height | int | 600 | Hauteur du canvas |
show_text | bool | False | Afficher les étiquettes de valeur |
Retourne
Chart
Exemples
import seraplot as sp
chart = sp.build_dumbbell3d_chart(
"Avant vs Après 3D",
labels=["Groupe A", "Groupe B", "Groupe C"],
values_start=[40, 55, 70],
values_end=[60, 75, 85],
)