ScrollAndZoom - get selected values

10 posts, 0 answers
  1. Natália
    Natália avatar
    36 posts
    Member since:
    Jun 2010

    Posted 06 Jul 2010 Link to this post

    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 ...
  2. Natália
    Natália avatar
    36 posts
    Member since:
    Jun 2010

    Posted 07 Jul 2010 Link to this post

    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 ...
  3. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 09 Jul 2010 Link to this post

    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
  4. Natália
    Natália avatar
    36 posts
    Member since:
    Jun 2010

    Posted 12 Jul 2010 Link to this post

    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!
  5. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 14 Jul 2010 Link to this post

    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
  6. Natália
    Natália avatar
    36 posts
    Member since:
    Jun 2010

    Posted 14 Jul 2010 Link to this post

    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 ...
  7. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 19 Jul 2010 Link to this post

    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
  8. Natália
    Natália avatar
    36 posts
    Member since:
    Jun 2010

    Posted 09 Aug 2010 Link to this post

    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!
  9. Ves
    Admin
    Ves avatar
    2926 posts

    Posted 12 Aug 2010 Link to this post

    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
  10. Grégory
    Grégory avatar
    21 posts
    Member since:
    Mar 2011

    Posted 24 May 2011 Link to this post

    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()

Back to Top