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

How to get data of adornmentInfo on event click

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;
        Method(value);
}

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

3 Replies

SJ Sumathi Jayaraj Syncfusion Team 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.


Regards,

Sumathi J


Attachment: AdornmentInfos_6c5c0934.zip


TR Tomas Raziel Garza Amaya 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.


SJ Sumathi Jayaraj Syncfusion Team 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

Regards,
Sumathi J 


Loader.
Up arrow icon