Rendering Plotly charts with the IFrame widget
Guide explains how to render Plotly charts in an app GUI using the IFrame widget
How it works, in short
1. Imports
import os
from pathlib import Path
import numpy as np
import plotly.graph_objects as go
import supervisely as sly
from supervisely.app.widgets import Container, Button, IFrame2. Create a folder for generated HTML files
3. Declare the IFrame widget
4. Register static_dir on the Application
static_dir on the Application5. Build the Plotly figure
6. Export the figure to HTML and point the IFrame at it
7. Wire it up to a button, with loading state
Full minimal example

Tips and common pitfalls
Last updated