ActualVisibleRange and ActualRange

3 posts, 0 answers
  1. Terry
    Terry avatar
    19 posts
    Member since:
    Feb 2014

    Posted 21 Apr 2014 Link to this post

    I need an explanation on a few items. I am using a DateTimeContinuous axis for my X-Axis on my chartview. There are three properties I would like some clarification on the following:

    DateTimeContinuous.Minimum and DateTimeContinuous.Maximum
    DateTimeContinuous.ActualVisibleRange (both minimum and maximum).
    DateTimeContinuous,ActualRange (both min and max properties)

    My understanding is:

    ActualRange is the data the chart contains. 
    ActualVisibleRange is the current viewport - or what the user sees.  
    Minimum and Maximum is the setter for ActualRange. But not entirely sure. (Need some explanation).

    So if I load a year of data (e.g. January thru Dec 2013), my actual range will be (1/2013 - 12/2013). If I then zoom and pan so that only march is displayed, my actualVisibleRange will change to (3/2013). The chart still contains the other data points, but they are not visible, so I need to zoom and pan to see them.

    The questions...
    Is there a way to programmatically set the ActualVisibleRange attribute?
    How about the ActualRange?
    What do the Minimum and Maximum attributes control?



  2. Petar Marchev
    Petar Marchev avatar
    991 posts

    Posted 23 Apr 2014 Link to this post

    Hello Terry,

    The Minimum and Maximum properties exist so that you are able to set a manual range. They, however, would not return the automatic range that the chart has calculated. To get the automatic range you can use the ActualRange property. When you have manually set the Minimum and/or Maximum, this property holds the user defined values as well, so it really is an axis' actual range property.

    The ActualVisibleRange is the actual visible range. This is when you zoom and pan, whatever you see in the view port (plot area), this is the ActualVisibleRange.

    1. Is there a way to programmatically set the ActualVisibleRange attribute?
    No, there is no such a feature. However, you can use the HorizontalZoomRangeStart and End properties to zoom in. Say that the axis has a range from 0 to 1000 and you need to zoom from 250 to 350. You need to simply set the horizontal zoom range start to 0.25 and the end to 0.35.

    2. How about the ActualRange?
    You need to set the Minimum and Maximum properties of the axis. 

    3. What do the Minimum and Maximum attributes control?
    They simply control the minimum and maximum of the axis. Say that you have a point with value -1000. If you do not set the minimum and maximum, the axis will calculate an automatic range so that the -1000 value is shown. But of you set a Minium of 0 and Maximum of 100, this negative value will not be show because it would not be in the visible range.

    Petar Marchev
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Valentin
    Valentin avatar
    85 posts
    Member since:
    Mar 2016

    Posted 6 hours ago Link to this post



    When the user is zooming in chart, the values of DateTime Axis are updated automaticaly. But sometimes, the values displayed are e.g. 01/03/2017 00:02:38 or maybe 01/05/2017 00:08:24.

    I found a solution to round up the seconds, but I can't apply it. You said that is it impossible to set the ActualVisibleRang, but there is an other possibility to apply my changements ?


    Thank you !

Back to Top