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

Improve autoscale?

4 Answers 215 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Jason D
Top achievements
Rank 1
Veteran
Jason D asked on 23 Jun 2020, 07:30 PM

How do I force the autoscale to always autoscale? First image shows a y-axis stuck at 0. It will eventually stop using 0, once the minimum gets much higher.

The second shows two charts with very similiar ranges. Both range from about -9 to 35, yet the second chart is using an 'incorrect' minimum of -20 while the first is correctly using -10.

4 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 26 Jun 2020, 08:57 AM

Hello Jason,

The RadCartesianChart's automatic range calculations are based on the plotted data. If one of the charts contains different data, then it is highly possible that the automatic range will be different. In order to achieve your requirement, you can manually adjust the charts' ranges by setting the Minimum, Maximum and MajorStep properties of the axis. Please try this and let me know if it helps.

Regards,
Martin Ivanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Jason D
Top achievements
Rank 1
Veteran
answered on 26 Jun 2020, 12:45 PM

The problem is not that they are different, the problem is that the autoscale is not working properly. If my minimum data point is -9, the minimum on the y-axis should be -10, not -20. The MajorStep is correct, but for some reason, the chart is adding an extra step when it is not necessary. Regardless of the number of charts, I want the autoscale to function properly. I shouldn't need to implement the autoscale function myself. My data is constantly changing; I don't know the min and max for the data ahead of time.

0
Jason D
Top achievements
Rank 1
Veteran
answered on 26 Jun 2020, 07:29 PM
Ok, I need to do more testing, but I seem to have found the problem after browsing the source. I've seen a few posts on this so maybe it will help others. For numerical axes, there is a propery called "RangeExtendDirection". If you set this to "None", you'll see normal behavior. I think should be the default, but I'm just glad it's easily changed.
0
Accepted
Martin Ivanov
Telerik team
answered on 01 Jul 2020, 10:39 AM

Hello Jason,

It is good to hear that you managed to find a solution. Also, thank you for sharing it with the community. I hope this will be useful for anyone else who is in the same situation.

Regards,
Martin Ivanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
ChartView
Asked by
Jason D
Top achievements
Rank 1
Veteran
Answers by
Martin Ivanov
Telerik team
Jason D
Top achievements
Rank 1
Veteran
Share this question
or