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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
powerdav
Regular Visitor

Tooltip render changes for custom line chart

Greetings everyone,

 

i'm trying to achieve a goal to render tooltip value as a single value based on hover line, instead of all series of values as default in line chart.

 

After some research in order to get default line chart code, that is not possibile yet because what i found about it is that power bi core repository is not available anymore, i found power kpi 2.0.0 line chart repository as a best way to start with.

Following link: https://github.com/microsoft/PowerBI-visuals-PowerKPI.

 

After get working debugger, i tried to follow powerbi developer documentation (https://docs.microsoft.com/en-us/power-bi/developer/visuals/add-tooltips) and some tips like this post: https://community.powerbi.com/t5/Developer/Custom-line-chart-visual-tooltip/m-p/1387403

But after several attempts in order to understand what's going on and how to change it and my lack of knowledge about this framework, i still fail in what i want to achive.

 

How can i achive this tooltip visualization based on power kpi 2.0.0 code and possibly (but it is an extra) implement tooltip section field as standard line chart?

Or how can i found exaustive documentation/video that can help me and get this stuff a lot more easier?

 

Thank you in advance for help and time you will provide me 😀

 

Regards

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @powerdav 

If you need to show a tooltip for dots you should render the dots first.

Please used d3.data method to bind data to each dot. Each data point must contain tooltip data that you want to show.

After that you need call addTooltip as you do in the code but the first argument must represent d3.selection for dots.

You can refer to Tooltip utils for tooltip customization in Power BI visuals.

 

Best Regards,

Rico Zhou

 

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @powerdav 

If you need to show a tooltip for dots you should render the dots first.

Please used d3.data method to bind data to each dot. Each data point must contain tooltip data that you want to show.

After that you need call addTooltip as you do in the code but the first argument must represent d3.selection for dots.

You can refer to Tooltip utils for tooltip customization in Power BI visuals.

 

Best Regards,

Rico Zhou

 

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

Thx @Anonymous for time and help. It definitly help to understand better the code behavior.

 

Is some code snippet that you know  about this case available on github repo that i can check?

 

Regards

 

David

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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