How to change the color for the z-axis labels in React Pareto Chart?
Description
This article explains how to change the color of the z-axis labels using the axisLabelRender event in React Charts.
Solution
The axis labels are used to show descriptive information about the axis. The color of the text displayed on the axis can be customized by using the color property of the labelStyle argument in the axisLabelRender event of the chart. Refer to axisLabelRender event for more information about the arguments in the event.
The Event Handler contains the axis, cancel, labelStyle, name, text, and value arguments. From these arguments, you can use the color property in the labelStyle argument to customize the color of the z-axis labels.
Code Snippet
The following example sets the text color for the z-axis labels as red
const labelRender = (args) => {
if(args.axis.name === "null_CumulativeAxis") {
// Change the color for the z-axis labels
args.labelStyle.color = "red";
}
};
Screenshot
Refer to the working sample for additional details and implementation: View Sample in Stackblitz
Conclusion
We hope you enjoyed learning how to change the color of the z-axis labels in the React Pareto 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, BoldDesk Support, or feedback portal. We are always happy to assist you!