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'm creating a custom visual which has a line chart with multiple lines. How to create the tool-tip similar to power bi native line chart? I have created simple tool-tips for bar charts but couldn't create one for a line chart. Also, the tool-tips doesn't seem to work if the bars in the bar chart is overlapping (bar-in-bar chart). I can share my code if required.
Solved! Go to Solution.
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.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
We don't have any sample custom visual that implements tooltip for line chart.
It seams you should detect cursor position and get data that is related to mouse position. After that, you should send data to Tooltip API.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Thanks for your reply @v-viig. I understand that the tool-tips in the native line chart are quite advanced. I will be happy with simple tool-tips which shows on hovering the dots which connects the lines in the line chart. Can you help me with that? I have shared my code with you
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.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Any chance somebody can share some up to date code examples of a basic tooltip (i.e. looks like native Power BI) for a custom visual dot chart?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |