When the font formatting properties of the axis is personalized all the text elements of the axis get personalized. So this article describes the way to personalize the axis labels alone.
The font formatting properties of the axis affects all the text elements related to the axis. Hence to customize the axis labels or any other text element that you want, custom templates can be assigned to the text element’s template property. Thus the desired text element alone can be customized.
The LabelTemplate property of the axis is used to customize the axis labels.
Note: The font formatting properties of the LabelTemplate i.e., font formatting properties in the TextBlock of the DataTemplate, must be overridden. If not the formatting properties of the axis TextElement are assigned to the labels of the axis, that is, if the FontSize 23 is not assigned in the LabelTemplate, the axis labels take the FontSize 30 from the TextElement.FontSize property of the axis.
The following screenshot illustrates the output for the axis labels whose font formatting remains undisturbed.
Figure 1: Chart with axis label style applied
This page will automatically be redirected to the sign-in page in 10 seconds.