Forum Discussion
Custom visual tooltip service not working
- 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}`,
}];
}
Thanks v-viig. Added the line this.host = options.host; in the constructor. The error is gone now but the tool tip is still not working :( What else am I missing? I can send you the full code files if needed.
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
- satishr8 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}`,
}];
}