We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Question about ChartAdornmentInfo SymbolTemplate


I try to migrate my Telerik chart to Syncfusion in order to just use Syncfusion as library and I have some problems

I attached two files :
- Current.png - Syncfusion actual rendering
- Wanted.png - Telerik actual rendering

My problems :
- How to set the SymbolTemplate Width the same with as the ColumnSegment
- How to bind SymbolTemplate to ColumSegment DataContext
- How to add centered label to the colum segment ?

My code is :

<charts:SfChart Width="{x:Bind ViewModel.ChartWidth, Mode=OneWay}" AreaBorderThickness="0">
                            <charts:NumericalAxis Visibility="Collapsed" ShowGridLines="False" />
                            <charts:CategoryAxis Visibility="Collapsed" ShowGridLines="False" />
                            <charts:ColumnSeries EnableAnimation="True" XBindingPath="Name" YBindingPath="Difference" ItemsSource="{x:Bind ViewModel.ChartParticipants, Mode=OneWay}">
                                    <DataTemplate x:DataType="charts:ColumnSegment">
                                            <Rectangle Canvas.Left="{x:Bind RectX, Mode=OneWay}" Canvas.Top="{x:Bind RectY, Mode=OneWay}" Height="{x:Bind Height, Mode=OneWay}" Width="{x:Bind Width, Mode=OneWay}" Stretch="Fill" Fill="{x:Bind Item, Converter={StaticResource ParticipantToBrushConverter}}" />
                                    <charts:ChartAdornmentInfo AdornmentsPosition="Top" ShowLabel="True" ShowMarker="True" LabelPosition="Center" SegmentLabelContent="YValue">
                                            <DataTemplate x:DataType="charts:ChartAdornmentInfo">
                                                <controls:ParticipantImage HasImage="False" Initial="GT" Height="{x:Bind  SymbolWidth, Mode=OneWay}" Width="{x:Bind SymbolWidth, Mode=OneWay}" />

Thanks in advance,

Attachment: Desktop_3be4e67f.zip

1 Reply

DA Devi Aruna Maharasi Murugan Syncfusion Team September 30, 2016 01:21 PM UTC

Hi Geoffery, 
Thanks for contacting Syncfusion Support. 
By default, the chart adornment symbol will render within the segment area. However, we have achieved your requirement by using the scatter series. 
We have prepared a demo sample for your reference and it can be downloaded from below link, 

Live Chat Icon For mobile
Up arrow icon