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.
Unfortunately, activation email could not send to your email. Please try again.

How to get data of adornmentInfo on event click

Thread ID:

Created:

Updated:

Platform:

Replies:

122149 Feb 20,2016 01:58 PM Feb 23,2016 03:44 AM WPF 3
loading
Tags: SfChart
Tomas Raziel Garza Amaya
Asked On February 20, 2016 01:58 PM

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.

Sumathi Jayaraj [Syncfusion]
Replied On February 22, 2016 08:37 AM

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

Tomas Raziel Garza Amaya
Replied On February 22, 2016 11:57 AM

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 03:44 AM

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 


CONFIRMATION

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.

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.

;