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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

0

Python visual not loading in tooltip

I believe I've found a bug where a python visual will not display as a tooltip. It doesn't plot anything, but just shows as blank.

 

I've made a simple python chart that plots a line from (0,0) to (1,1) not using any actual data from my report. I have thrown a measure in the visual field well since it needs one to plot anything. It's a simple SELECTEDVALUE measure. When I look at the tooltip page itself (as in not via a tooltip from another report page), the python plot works, even though I have no value for the SELECTEDVALUE measure. (Python plot on the left, card visual with the same SELECTEDVALUE measure on the right)

jtspilker_0-1683556605996.png

When I look at the tooltip from another report page (using actual tooltip behavior), the plot doesn't draw anything, even though the SELECTEDVALUE measure does have a value.

jtspilker_1-1683556678953.png

If it matters, my python code is

 

 

 

 

import matplotlib.pyplot as plt

# Define the x and y coordinates of the line endpoints
x_values = [0, 1]
y_values = [0, 1]

# Plot the line
plt.plot(x_values, y_values)

# Display the plot
plt.show()

 

 

 

 

Status: Delivered
Comments
Anonymous
Not applicable

Hi  @jtspilker ,

This is not a bug but a known limitation of the current product design on python visual.  and the parts below that prevents tooltips:

  • Python visuals refresh upon data updates, filtering, and highlighting. The image itself isn't interactive.

  • Python visuals respond to highlighting elements in other visuals, but you can't select elements in the Python visual to cross-filter other elements.

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

 

If you would like to suggest  feature improvements, you may  vote the idea and comment here  to improve this feature. It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,
Community Support Team _ Caitlyn

jtspilker
Helper I

@Anonymous thanks for the reply. Just to be clear, I was under the impression that the limitations you note above prevent tooltips from being created in the python visual, not simply using a python visual in a native Power BI tooltip. Is this the case? Seems logical to me that if python visuals can respond to highlighting from other visuals, then that same filter context can be passed through a tooltip to a python visual therein.

 

thanks!

Jordan