Plotly Module¶
This section documents the plotly components of the Nextmv Python SDK - Local experience.
plotly_handler
¶
Plotly visualization handler module.
This module provides functionality to handle Plotly visualizations by converting them to HTML files for local run processing.
FUNCTION | DESCRIPTION |
---|---|
handle_plotly_visual |
Handle and write Plotly visuals to HTML files. |
handle_plotly_visual
¶
handle_plotly_visual(
asset: Asset, visuals_dir: str
) -> None
Handle and write Plotly visuals to HTML files.
This function processes Plotly visualization assets and converts them to HTML files. It handles both single visualizations (dict content) and multiple visualizations (list content). Each visualization is converted from JSON format to a Plotly figure and then saved as an HTML file.
PARAMETER | DESCRIPTION |
---|---|
|
The asset containing the Plotly visualization data. The content can be either a dictionary (single visualization) or a list (multiple visualizations).
TYPE:
|
|
The directory path where the HTML files will be written.
TYPE:
|
Notes
- For list content, each visualization is saved with an index suffix (e.g., "chart_0.html", "chart_1.html")
- For dict content, the visualization is saved with the asset label (e.g., "chart.html")
- Content types other than dict or list are currently ignored