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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Adding Tooltips to HTMLElement?

I have a custom visual that is very similar to the native KPI. I want to add tooltips that look standard to it, but I don't use d3, it is just an HTMLElement.

 

I can go through the installation of d3 and powerbi-visuals-utils-tooltiputils, but I don't think I can get it to work without being able to pass it a d3 element upon selection. And if I try to pass in the HTML target I use, I get the error "Argument of type 'HTMLElement' is not assignable to parameter of type 'Selection<any>'."

 

Has anybody done this before?

1 REPLY 1
v-viig
Community Champion
Community Champion

Hello @Anonymous,

 

It'd be better to use d3 and powerbi-visuals-utils-tooltiputils.

You just have to select your HTMLElement using d3:

d3.select(Your_HTMLElement)

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

 

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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