Black Lives Matter. Please consider donating to Black Girls Code today.

Plotly in PowerBI - plot in frame rather than opening a HTML file

Hi all,

Can anyone tell me if there’s a way to generate a plot in place, rather than opening a web browser to display a HTML file?

I am trying to use Plotly for Python in Microsoft Power BI. The following code runs and opens a web browser showing the plot:

import plotly.graph_objects as go

fig = go.Figure(
    data=[go.Bar(y=[2, 1, 3])],
    layout_title_text="A Figure Displayed with fig.show()"
)
fig.show()

I want it to show the graph inside PowerBI.

Does anyone know it this is possible?

Many thanks.