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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Adding tooltips to a custom visual

Hi,

 

I would like to add tooltips to a custom visualization I am currently working on. i have been reading:

 

https://github.com/Microsoft/powerbi-visuals-utils-tooltiputils/blob/master/docs/api/tooltipservice....

 

But It seems to me the tooltipservice has a dependency to the d3 library, but my visualization doesn't use d3, it's more like an advanced label.

 

interface ITooltipServiceWrapper {
    addTooltip<T>(selection: d3.Selection<any>, getTooltipInfoDelegate: (args: TooltipEventArgs<T>) => VisualTooltipDataItem[], getDataPointIdentity?: (args: TooltipEventArgs<T>) => ISelectionId, reloadTooltipDataOnMouseMove?: boolean): void;
    hide(): void;
}

 

Can I use the Tooltipservice without d3? If so can you pintpoint me to a basic example of adding tooltips to a visualization without d3?

 

Kind regards Erik

  

 

 

 

1 ACCEPTED SOLUTION
v-viig
Community Champion
Community Champion

We don't have any basic sample but we would recommend to take a look at how TooltipUtils work with TooltipService directly.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

3 REPLIES 3
v-viig
Community Champion
Community Champion

Hi @Anonymous,

 

You're right. TooltipService from TooltipUtils depends on d3v3.

Tooltip API can be used directly by firing move, show, hide methods of internal TooltipService.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Anonymous
Not applicable

Thanks, is there any sample code available that shows ho to call these methods directly from a custom visual?

v-viig
Community Champion
Community Champion

We don't have any basic sample but we would recommend to take a look at how TooltipUtils work with TooltipService directly.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors