Articles in this section
Category / Section

How to disable the tooltip when the data point has zero value in Angular Charts?

2 mins read

Description

This article shows how to disable the tooltip when the data point has zero value in Angular Charts.

Solution

When you hover over a data point with your mouse, a tooltip appears to show information about that specific point. The tooltipRender event is triggered when the mouse hovers over the data point. If you want to disable the tooltip for a data point with a zero value, you can enable the cancel argument in the tooltipRender event of the chart.

Code Snippet

public tooltipRender(args): void {
   if (args.point.y === 0) {
     args.cancel = true; // Cancel the tooltip if y-value is 0
   }
 }

The following image illustrates the output of the above code.

image.png

View Sample in Stackblitz

Conclusion

I hope you enjoyed learning how to disable the tooltip when the data point has zero value in Angular Charts.

You can refer to our Angular Charts feature tour page to learn about its other features and documentation, and how to quickly get started for configuration specifications. You can also explore our Angular Charts example to understand how to create and visualize data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comment section below. You can also contact us through our support forums, support portal, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied