sda.dashboard.utils#
Dashboard utility subpackage (Plotly figure helpers, etc.).
Submodules#
Functions#
|
Apply theme to a Plotly figure. |
|
Get Plotly theme template from configuration. |
Package Contents#
- sda.dashboard.utils.apply_theme_to_figure(fig, theme='light')#
Apply theme to a Plotly figure.
- Parameters:
fig (
plotly.graph_objects.Figure) – Aplotly.graph_objects.Figureinstance to update.theme (
str, default"light") – Theme key to apply.
- Returns:
The same figure instance, updated in-place.
- Return type:
plotly.graph_objects.Figure
See also
get_plotly_theme_template()Retrieve the theme layout mapping.
- sda.dashboard.utils.get_plotly_theme_template(theme_mode='light')#
Get Plotly theme template from configuration.
- Parameters:
theme_mode (
str, default"light") – The theme mode to use (e.g. “light”, “dark”).- Returns:
A mapping suitable for
plotly.graph_objects.Figure.update_layout().- Return type:
See also
apply_theme_to_figure()Apply the theme to an existing
plotly.graph_objects.Figure.