Auto scale Y Axis

4 posts, 0 answers
  1. psyko
    psyko avatar
    5 posts
    Member since:
    Feb 2016

    Posted 13 Feb 2016 Link to this post


    I am using a RadCartesianChart plotting a CandlestickSerie to it with a DateTimeCategoricalAxis and a LinearAxis.

    I enabled the ChartPanAndZoomBehavior both on the horizontal mode.

    When I plot, let's say, 200 candles the LinearAxis maximum and minimum are somewhat consistent with the candles min/max (but still I'd like to have it more fit). But if I zoom in, the LinearAxis min/max is not updated to fit best what is now displayed.

    How can I get the current min / max of the DateTimeCategoricalAxis? I understand that there is no direct option to do so, but can I do it using the PanOffset or something else? Because with the min / max of the DateTimeCategoryAxis it would be very easy to programatically adjust the min / max of my LinearAxis.

    I put two screen without zoom and with zoom where you can see that the LinearAxis min / max is not updated and I highlighted around where I'd like to have it (basically it's a function of the displayed high/low of the serie) 


  2. psyko
    psyko avatar
    5 posts
    Member since:
    Feb 2016

    Posted 14 Feb 2016 in reply to psyko Link to this post

    Just found the HorizontalZoomRangeStart and HorizontalZoomRangeEnd parameters, I will manage with this :)
  3. Peshito
    Peshito avatar
    585 posts

    Posted 17 Feb 2016 Link to this post


    I am glad you managed to solve this. As for the min and max of the DateTimeCategoricalAxis you should switch to DateTimeContinuous axis instead, in order to be able to use the Minimum and Maximum properties of the axis. You could also take advantage of the axis' ActualRange and ActualVisibleRange properties.

    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 Feedback Portal and vote to affect the priority of the items
  4. Marko
    Marko avatar
    2 posts
    Member since:
    May 2020

    Posted 28 May Link to this post


    Can you please suggest how to make perfect zoom  / fit of the candles in the chart? The candles in the screenshot for example are very small and leave a lot of empty space. What would be the best way to make the candles use all of the available space and when you Increase/Decrease the zoom the candles to adjust accordingly. 

Back to Top