How to apply template to chart adornments?
The LabelTemplate property in the ChartAdornmentsinfo can be used to specify the name of the template to be applied.
The following code example shows how a template can be applied to chart adornments.
Template for Chart Adornments Label
<DataTemplate x:Key="Lbltxt1"> <TextBlock Name="TB1" Text ="{Binding}" FontSize="11" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"> <TextBlock.LayoutTransform> <RotateTransform Angle="270"/> </TextBlock.LayoutTransform> </TextBlock> </DataTemplate>
Applying template to chart adornments
<syncfusion:ChartSeries Name="Series 1" Type="Column"> <syncfusion:ChartSeries.AdornmentsInfo> <syncfusion:ChartAdornmentInfo LabelTemplate="{StaticResource Lbltxt1}" LabelContentPath="DataPoint.X" Visible="True" VerticalAlignment="Bottom"/> </syncfusion:ChartSeries.AdornmentsInfo> </syncfusion:ChartSeries>