This is a migrated thread and some comments may be shown as answers.

ScrollAndZoom - get selected values

9 Answers 99 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Natália
Top achievements
Rank 1
Natália asked on 06 Jul 2010, 02:29 PM
Hello,

I am using the feature ScrollAndZoom in my chart and would like to know if there is a way to get the values that are selected to perform a filter on the data from this information.

Thanks ...

9 Answers, 1 is accepted

Sort by
0
Natália
Top achievements
Rank 1
answered on 07 Jul 2010, 08:36 PM
Hi,

I researched a lot and can not find a solution to this problem.
I know the event ZoomScrollSettingsX.PropertyChanged occurs when we make a selection on the graph by zooming.
The only way to recover the items selected would be to map through RangeStart, RangeEnd or Range?

Do not know if I explained correctly, but I plan to filter the chart data in accordance with what is selected by Zoom, have any idea how can I do?

Thanks ...
0
Vladimir Milev
Telerik team
answered on 09 Jul 2010, 08:56 AM
Hi Natália,

When you zoom, RadChart internally filters the data according to the selected zoom range. For example if you have selected 0.25 through 0.35 as your range, RadChart will find the XAxis positions corresponding to those fractions and will filter all data that is outside of those bounds. It does this automatically for you.

Best wishes,
Vladimir Milev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Natália
Top achievements
Rank 1
answered on 12 Jul 2010, 02:08 PM
Hello Vladimir,

I understand what you said, but what i want is to get information from selected series.
For example, if I have the x-axis the months of the year and select the series in January and February, I would get this information.
Would you like to get the value of X that was selected.
Understand?

Thank you in advance!
0
Vladimir Milev
Telerik team
answered on 14 Jul 2010, 03:03 PM
Hello Natália,

After selecting a range between January and February for example, (as you mentioned) then the new range of the X Axis would be between January and February. Simply taking the Min and Max values of the Axis should be sufficient? Does that work for you?

Regards,
Vladimir Milev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Natália
Top achievements
Rank 1
answered on 14 Jul 2010, 04:05 PM
Hello,

Thank you for your attention.

What I want is to know which was the month selected.
For example, the XValues filled with numbers 1-12 and select January and February when I get the values of XValues.
In this case the X axis is fixed, then with some work could find the month selected by the range, but in other situations will not have this control, the X axis is populated dynamically.
I want to know if there is a way of knowing which XValues was selected by Zoom.

Thanks ...
0
Ves
Telerik team
answered on 19 Jul 2010, 12:50 PM
Hello Natália,

There is no direct relation between the selection and the chart items. When a region is selected, the chart calculates how the selected area is related to the current view and re-calculates the bounds for the axes. Then the chart filters the data, so that only the datapoints, which are within the selection are shown. That said, Vladimir has already explained how to obtain the bounds of the selected region -- these are basically the min and max values of the corresponding axis after the zoom/scroll process.

Best regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Natália
Top achievements
Rank 1
answered on 09 Aug 2010, 07:14 PM
Thank you for answers and sorry for the insistence on the subject, but could not find a solution yet.
Could, please create an example of how I can get the new min and max value for the X axis, after making a selection in the chart?

Thank you in advance!
0
Ves
Telerik team
answered on 12 Aug 2010, 10:14 AM
Hello Natália,

Please, find attached a small example.

Best regards,
Ves
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Grégory
Top achievements
Rank 1
answered on 24 May 2011, 07:04 PM
in telerikChart.DefaultView.ChartArea.DataSeries you have all data you need.

Try this, it worked for me:

First element in first DataSeries: telerikChart.DefaultView.ChartArea.DataSeries[0].First()

Tags
Chart
Asked by
Natália
Top achievements
Rank 1
Answers by
Natália
Top achievements
Rank 1
Vladimir Milev
Telerik team
Ves
Telerik team
Grégory
Top achievements
Rank 1
Share this question
or