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

Auto scale Y Axis

3 Answers 521 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
psyko
Top achievements
Rank 1
psyko asked on 13 Feb 2016, 11:24 PM

Hello,

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) 

 Regards

3 Answers, 1 is accepted

Sort by
0
psyko
Top achievements
Rank 1
answered on 14 Feb 2016, 10:36 AM
Just found the HorizontalZoomRangeStart and HorizontalZoomRangeEnd parameters, I will manage with this :)
0
Peshito
Telerik team
answered on 17 Feb 2016, 09:11 AM
Hello,

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.

Regards,
Peshito
Telerik
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
0
Marko
Top achievements
Rank 2
Iron
answered on 28 May 2020, 10:05 PM

Hello,

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. 

Tags
ChartView
Asked by
psyko
Top achievements
Rank 1
Answers by
psyko
Top achievements
Rank 1
Peshito
Telerik team
Marko
Top achievements
Rank 2
Iron
Share this question
or