Articles in this section
Category / Section

How to apply template to chart adornments?

1 min read

 

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>

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied