Articles in this section
Category / Section

How to Change the Tooltip Text Color in Angular Spline Charts?

2 mins read

This article explains how to change the tooltip text color based on the series color in Angular Spline Charts. You can dynamically change the tooltip text color in Syncfusion Angular Spline Charts based on the series color. This customization is achieved using the tooltipRender event of the chart.

The tooltipRender event is triggered just before the tooltip is displayed. Within the event handler, you can set the textStyle.color property of the tooltip to match the interior (fill color) of the corresponding series. This ensures the tooltip text color aligns visually with the series color.

The following code snippet shows how to implement this in Angular Spline Charts:

app.component.html

<ejs-chart (tooltipRender)='tooltipRender($event)'>
</ejs-chart>

app.component.ts

public tooltipRender(args: ITooltipRenderEventArgs): void {
   args.textStyle.color = args.series.interior;
};

The following screenshot illustrates the output of the above code snippet:

image.png

Refer to the working sample for additional details and implementation : Sample

Conclusion

We hope you enjoyed learning how to filter data for Angular Chart series using a specific field.

You can refer to our Angular Charts feature tour page to know about its other groundbreaking feature representations, Documentation for configuration specifications, and how to quickly get started. You can also explore our Angular Charts example to understand how to create and manipulate 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 comments section below. You can also contact us through our support forums, BoldDesk Support, 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