Forum Discussion
satishr
8 years agoHelper III
Custom visual tooltip service not working
I'm writing a custom visual with some KPIs and a bar chart. I have created the bar chart by following the below article. https://tsmatz.wordpress.com/2016/09/27/power-bi-custom-visuals-programming/ ...
- 8 years ago
Thank you for sharing. We're going to look into the issue.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- 8 years ago
v-viig Thanks for sharing the solution. Below were the changes done in my code.
this.tooltipServiceWrapper.addTooltip(this.svg.selectAll('.bar'),(tooltipEvent: TooltipEventArgs<BarData>) => Visual.getTooltipData(tooltipEvent.data),(tooltipEvent: TooltipEventArgs<BarData>) => null);
private static getTooltipData(data: BarData): VisualTooltipDataItem[] {
return [{
displayName: data.Date,
value: `${data.Indicator}`,
}];
}
v-viig
8 years agoCommunity Champion
satishr yes, please share the full source code.
You might share the code here or send it to [email protected]
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
satishr
8 years agoHelper III
Thanks, v-viig. I have sent a mail with subject "Need help making tool-tip work".
- v-viig8 years agoCommunity Champion
Thank you for sharing. We're going to look into the issue.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- satishr8 years agoHelper III
v-viig Thanks for sharing the solution. Below were the changes done in my code.
this.tooltipServiceWrapper.addTooltip(this.svg.selectAll('.bar'),(tooltipEvent: TooltipEventArgs<BarData>) => Visual.getTooltipData(tooltipEvent.data),(tooltipEvent: TooltipEventArgs<BarData>) => null);
private static getTooltipData(data: BarData): VisualTooltipDataItem[] {
return [{
displayName: data.Date,
value: `${data.Indicator}`,
}];
}- Anonymous6 years agoNot applicableHello. can you please share your solution? I'm working to add a tooltip page in custom visual. Thank you.