Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have been able to create a visual that uses host.visualTooltipService to show a tooltip that is a Report Page tooltip.
However, I'm having a problem in that if I mouse over the toolitp it hides (expected) but then if I attempt to show the same tooltip with the same info it will show but then immediately hide.
However, if I mouse out of the visual and then back in I get normal behavior.
I can confirm that the tooltip when hidden is actually still in the html of the page but does have a display:none style setting. No function I have for hiding the visual is being called to hide it.
I tried dispatching each a mouseout and then pointerleave and pointerenter event to see if that would trick the visual into thinking whatever happens when I mouse out of the visual and back in was happening so I could get the better behavior. But that seemed to break stuff rather than fix it.
ChatGBT seemed to think that there is a context property for the tooltip args. I tried its recommendation and set a context: {selectionID:Number(new Date()) in order to 'cache bust' the tooltip hoping that would reset whatever is hiding it, but that didn't seem to work. Also VisualStudioCode IDE doesn't seem to think that's context is one of the tooltip options.
Anybody out there developing visuals that support report-page tooltips or on the PowerBI team that may have un into this problem or would be able to look at why when mouse/pointer leave/out of a visual the tooltip state resets and why that is not true on hide? Is there a way to force the visibility on the tooltip when the tooltipService.show doesn't work?
I should note that thus far I am intentionally not using the tooltipServiceWrapper because I am detecting hover events in my visual and am hitting an api to get identifiers back before showing the tooltip. The tooltipServiceWrapper seems to be more about showing the latest data an and taking care of the hover detection.
I seem to have fixed the problem I was having, though technically its working around the deeper concern I have with the hide that the mouseover does on the tooltip display.
I have a hoverTarget class that I am using to add/remove pointer events to my map. And the debounce timeout I have in it was including notifying of a mousemove (cancel event) within the timeout. More specifically I was doing a check within the timeout and either emitting a cancelled or hovered event depending on certain conditions.
By emitting the cancelled event before setting the timeout I am able to handle that in the visual and hide the tooltip faster than the powerbi event that hides the tooltip can be triggered. Since that powerbi event was causing the issue, not-letting it trigger means my flashing tooltip issue has been 'solved'.
I'm not really able to setup a test case at present as tracking down this issue has put me a little behind schedule. However, I can suggest a test case if someone is willing to verify the behavior:
All that should be required is a simple visual with a button that when clicked opens a tooltip, in particular a report page tooltip.
Rather than creating a new tooltip wrapper, the visual should use options.host.tooltipService.show(...) and the show options should indude identifiers.
This would also require a report page tooltip and that the visual tester be configured to show tooltips and point it to the tooltip report page.
Testing the visual would mean showing the tooltip via button click. Mousing over the tooltip to dismiss it, then clicking the button again.
If doing so causes the tooltip to show then hide then that would confirm it has nothign to do with all the other stuff happening in my code and that it is a bug that should be reported to Microsoft.
Hi Daniel,
I was trying to keep the relevant parts simple, my total visual is a bit more complicated.
I am iframing an angular app within my visual as I have a map application. The map interface has a "hovertip" that detects when the mouse hovers over the map and then calls an api under my control to retrieve data under the cursor. Normally I would display a tooltip like display in the map, however, I wanted to leverage the Report Page tooltip.
So the map app knows that it is in an embedded context and sends a message back to the visual with the point coordinate and a map-feature identifier (an id).
You would think that was the hard part but it actually is working well.
Note the rectangular area with the heading Shelby is based on a report page. The map and toolbar above it are my app and in an iframe in a visual. The stuff above the visual are slicers and cards in power BI. So, I undstood enough to get that far.
The visual handles a show-tooltip message from the iframe and after gathering relevant information to determine how to apply the id, I execute:
Hi @arthur_clifford,
I've developed many visuals and have never run into this problem with tooltips. Tooltip invocation in Power BI is pretty straightforward—you either populate the data manually (for a standard tooltip) or provide a valid selection ID based on the data Power BI initially sends to the data view for a report page tooltip. If the selection ID is not valid, it usually displays a standard tooltip, as it cannot resolve your selector against the data model. Tooltips are shown with .show() and hidden with .hide() events, wired up to event handlers as needed. Power BI should take care of the .hide() event via the visual host when the mouse is moved out of the visual, so normally, a subsequent .show() by your logic is called; this should work as expected.
I'm having trouble understanding how you are implementing your specific use case. Admittedly, I haven't tried populating tooltip info via an API call, but my understanding is that I might use the following high-level workflow, so that I'm using the tooltip service APIs as intended:
In the last step, I'd include any selection IDs I need for the given dataset row so that Power BI displays the correct tooltip for the desired row context.
If you're calling an API and trying to fabricate selection IDs, this is likely not going to be supported and sounds like something that Power BI may not be able to reconcile, unless you are somehow getting a valid data view that you can generate legitimate selection IDs against. However, I don't think it'll be easy to assist further without seeing some code - can you share this?
Many thanks,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Daniel, I added what I thought was a response to your question but I think it posted as a second comment on my original post.
I'm using this code to create my selectionIds
If you can see my previous post you can see that I am doing a communication with an api on on response sending info back to the powerbi visual such that it is showing results in the popup. So at a high level what you outlined is roughly what is happening with the addition of visual to iframe intercommunication.
I've somewhat improved things by catching mouse mouse movement better,sooner, to try to hide the tooltip before the user can trigger a mouse over on the tooltip itself.
Do you know how I would bring this up with the PowerBI developers if I had to? I'd like to know if the mouse over or enter event for the tooltip is triggering a different close function than the one in the tooltip service and whether there is some state or style that it should clear that it isn't.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |