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

customize adornments with another Y value

I am used a class with three attribute: date, a numeric value and a description of this value (string).

I would obtain a SfChart (LineSeries) with date in x axis, numeric value in y axis and description of this value as adorment.

I have obtained the Line Series with date and numeric value, my problem is assign the description at adornment.

Can you help me?

1 Reply

RA Rachel A Syncfusion Team August 5, 2015 05:27 AM UTC

Hi Claudio,
Thanks for contacting Syncfusion support.
Query: How to set the description for adornments?
We can achieve your requirement using LabelTemplate property in ChartAdornmentInfo, is used to customize the adornment labels as shown in the below code snippet.
                <chart:LineSeries XBindingPath="Year" YBindingPath="India" ItemsSource="{Binding  DataPoints}" >
                    <chart:ChartAdornmentInfo ShowLabel="True" Symbol="Ellipse"  SegmentLabelContent="LabelContentPath" ShowMarker="True">
                                <TextBlock FontSize="12" Foreground="White"
                           Margin="5" Text="{Binding Path=Item.Description}"/>
Here ‘Item’ represents the underlying object, from that we can get required property.
You can get the output as shown in the below image.

We have prepared the sample for your reference. Please find the sample in the below location.
Sample: Adornment_WinRT
Please refer the below UG documentation to know about customization of adornments.
Link: http://help.syncfusion.com/ug/wpf/Documents/customizingadornments.htm
Please let us know if you require any further assistance on this.
Rachel. A

Live Chat Icon For mobile
Up arrow icon