How to change the text color of the legend in the React Pie Charts?
Description
This article shows how to change the text color of the legend in the React Pie Charts.
Solution
A legend provides information about the different elements or data series represented on the graph. By default, the text color of the legend is black for light themes and white for dark themes.
However, if you wish to change the text color, you can use the color property of the textStyle in legendSettings. This way, you can customize the legend to fit your needs and preferences.
Code Snippet
<AccumulationChartComponent
id="pie-chart"
legendSettings={{ visible: true, textStyle: { color: "red" } }}>
</AccumulationChartComponent>
The following image illustrates the output of the above code
Conclusion
I hope you enjoyed learning how to change the text color of the legend in the React Pie Chart.
You can refer to our React 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 React 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!