Skip to main content
The Plotly class allows you to display a Plotly chart in the chatbot UI. This class takes a Plotly figure. The advantage of the Plotly element over the Pyplot element is that it’s interactive (the user can zoom on the chart for example).

Attributes

str
The name of the chart to be displayed in the UI.
ElementDisplay
Determines how the chart element should be displayed in the UI. Choices are “side”, “inline”, or “page”.
ElementSize
Determines the size of the chart. Only works with display=“inline”. Choices are “small”, “medium” (default), or “large”.
str
The plotly.graph_objects.Figure instance that you want to display.

Example