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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get data of adornmentInfo on event click

Thread ID:





122149 Feb 20,2016 06:58 PM UTC Feb 23,2016 08:44 AM UTC WPF 3
Tags: SfChart
Tomas Raziel Garza Amaya
Asked On February 20, 2016 06:58 PM UTC

I can get X data and Y data when i do clic en a serie segment with this code:

FrameworkElement element = e.OriginalSource as FrameworkElement;
if (element != null && element.Tag is ChartSegment)
        ColumnSegment segment = element.Tag as ColumnSegment;
        Entity data = segment.Item as Entity;
        value = data.dataX;

The code is functional if I do clic in a "column segment", but if i do clic in adornmentInfo, isn't functional.

Sumathi Jayaraj [Syncfusion]
Replied On February 22, 2016 01:37 PM UTC

Hi Tomas,


Thanks for contacting Syncfusion Support.


Adornment is with different UI structure, it will not hold the chart segment information. We are able to get the chart segment information in alternate way. We have prepared a sample to achieve your requirement and it can be downloaded from the following location.


Sumathi J

Attachment: AdornmentInfos_6c5c0934.zip

Tomas Raziel Garza Amaya
Replied On February 22, 2016 04:57 PM UTC

Exactly that I need, thanks, but my series are LineSeries, the code not run, I try change "ColumnSegment" for "LineSegment" or series.ColumnsSegment[index] but I can't.

Sumathi Jayaraj [Syncfusion]
Replied On February 23, 2016 08:44 AM UTC

Hi Tomas,
Thanks for the update.
We are able to access the line segment by using custom line series like the custom column series provided in the previous sample. Since, the line series is a continuous series, the segments count will be as DataCount -1. In the adornment case, we have assessed the series item source to get the X data.  We have modified the sample to meet your requirement and it can be downloaded from the following location.
Sample: LineAdornment

Sumathi J 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon