plotly_plot¶
- class virtualitics_sdk.elements.plotly_plot.PlotlyPlot(fig, title=None, show_title=True, description='', show_description=True)¶
Bases:
Plot
Create a plot using the Plotly package.
` import plotly.express as px fig = px.scatter(pandas_df, trendline="ols") plotly_plot = PlotlyPlot(fig) `
- Parameters:
fig (
Figure
) – A Plotly figure objecttitle (
Optional
[str
]) – The title of the PlotlyPlot, if not specified, the title of object Plotly is used.show_title (
bool
) – Whether to show the title on the page when rendered, defaults to True.description (
str
) – The element’s description, defaults to ‘’.show_description (
bool
) – Whether to show the description to the page when rendered, defaults to True.
- save(link, is_ssf=False)¶
Save a plot serialization into a Link.
- Parameters:
link (
Link
) – The link to save the element to.
- to_json()¶
Convert the element to a JSON.
- Returns:
A JSON dictionary of the element.