Forum Discussion
Anonymous
4 years agoNot applicable
Add tooltip to a custom Visual
Hello everyone! I developed a custom visual and I want to add tooltips. I have installed the package like described in the Microsoft documentation. If I want to add a mouse event with the tooltip...
- Anonymous4 years ago
Hi Anonymous
Here is an example code to add tooltips to custom visual. Try it and compare it with your codes.
For reference: Sample code
... private renderTooltip(selection: Selection<Line | Task | MilestonePath>): void { this.tooltipServiceWrapper.addTooltip( selection, (tooltipEvent: TooltipEventArgs<TooltipEnabledDataPoint>) => { return tooltipEvent.data.tooltipInfo; }); } ...Here is a post with similar requirement like yours.
For reference:
Custom Visual Tooltip Data Option
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi Anonymous
Here is an example code to add tooltips to custom visual. Try it and compare it with your codes.
For reference: Sample code
...
private renderTooltip(selection: Selection<Line | Task | MilestonePath>): void {
this.tooltipServiceWrapper.addTooltip(
selection,
(tooltipEvent: TooltipEventArgs<TooltipEnabledDataPoint>) => {
return tooltipEvent.data.tooltipInfo;
});
}
...
Here is a post with similar requirement like yours.
For reference:
Custom Visual Tooltip Data Option
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.