Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
MicrosoftUser42
Frequent Visitor

Python Events not working?

Hi everyone,

 

I am trying to plot a graph with matplotlib in Power BI and as part of that, I am trying to implement click & hover events. Works fine, when I execute the code from VS Code, but nothing happens in PowerBI. Are events like this disabled? I assume that instead of actually implementing the resulting plot, PowerBI probably just renders it as an image? Then ofc I can forget about making python graphs in PowerBI interactive..

 

Best Regards

2 ACCEPTED SOLUTIONS
rajendraongole1
Super User
Super User

Hi @MicrosoftUser42 - 

Yes, your assumption is correct. When you use Python visuals in Power BI, Power BI generates the plots as static images rather than interactive objects. Power BI currently does not support interactive Python or R plots (like those created with plotly or bokeh), nor does it enable interactivity in plots created with matplotlib click and hover events. It simply renders the resulting plot as a static image and embeds it into the Power BI report.

This means that any interactive features, such as click or hover events, will not work in Power BI. These events are handled in real-time by Python environments like Jupyter Notebook or VS Code, but Power BI lacks this interactivity layer for Python visuals.

For interactive visualizations in Power BI, you might want to explore Power BI’s own custom visuals, such as the ones in Power BI Marketplace, or use third-party tools like Power BI’s integration with Power Apps for more advanced interactivity. Alternatively, Power BI’s built-in visualizations and custom visuals often provide similar functionality that can allow for user interaction (though limited compared to full Python interactivity).

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

You can create interactive plots in R (with a HTML hack) or Deneb, but not in Python (although the HTML hack might work there too?)

 

Interactive R custom visuals support is here! | Microsoft Power BI Blog | Microsoft Power BI

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @MicrosoftUser42 ,

Based on the description, Python visuals refresh upon data updates and highlighting. The image itself isn’t interactive.

vjiewumsft_0-1731488825914.png

You can view the following document to learn more information.

Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

rajendraongole1
Super User
Super User

Hi @MicrosoftUser42 - 

Yes, your assumption is correct. When you use Python visuals in Power BI, Power BI generates the plots as static images rather than interactive objects. Power BI currently does not support interactive Python or R plots (like those created with plotly or bokeh), nor does it enable interactivity in plots created with matplotlib click and hover events. It simply renders the resulting plot as a static image and embeds it into the Power BI report.

This means that any interactive features, such as click or hover events, will not work in Power BI. These events are handled in real-time by Python environments like Jupyter Notebook or VS Code, but Power BI lacks this interactivity layer for Python visuals.

For interactive visualizations in Power BI, you might want to explore Power BI’s own custom visuals, such as the ones in Power BI Marketplace, or use third-party tools like Power BI’s integration with Power Apps for more advanced interactivity. Alternatively, Power BI’s built-in visualizations and custom visuals often provide similar functionality that can allow for user interaction (though limited compared to full Python interactivity).

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





You can create interactive plots in R (with a HTML hack) or Deneb, but not in Python (although the HTML hack might work there too?)

 

Interactive R custom visuals support is here! | Microsoft Power BI Blog | Microsoft Power BI

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.