sda.dashboard.utils.figure_utils ================================ .. py:module:: sda.dashboard.utils.figure_utils .. autoapi-nested-parse:: Plotly Figure Utilities. ======================= Helper functions for creating and manipulating Plotly figures. Functions --------- .. autoapisummary:: sda.dashboard.utils.figure_utils.get_plotly_theme_template sda.dashboard.utils.figure_utils.apply_theme_to_figure Module Contents --------------- .. py:function:: get_plotly_theme_template(theme_mode = 'light') Get Plotly theme template from configuration. :param theme_mode: The theme mode to use (e.g. "light", "dark"). :type theme_mode: :py:class:`str`, *default* ``"light"`` :returns: A mapping suitable for :py:meth:`plotly.graph_objects.Figure.update_layout`. :rtype: :py:class:`dict` .. seealso:: :py:func:`~sda.dashboard.utils.figure_utils.apply_theme_to_figure` Apply the theme to an existing :class:`plotly.graph_objects.Figure`. .. py:function:: apply_theme_to_figure(fig, theme = 'light') Apply theme to a Plotly figure. :param fig: A :class:`plotly.graph_objects.Figure` instance to update. :type fig: :py:class:`plotly.graph_objects.Figure` :param theme: Theme key to apply. :type theme: :py:class:`str`, *default* ``"light"`` :returns: The same figure instance, updated in-place. :rtype: :py:class:`plotly.graph_objects.Figure` .. seealso:: :py:func:`~sda.dashboard.utils.figure_utils.get_plotly_theme_template` Retrieve the theme layout mapping.