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

Reset YAxis minvalue to Auto

1 Answer 45 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 2
Joel asked on 21 Aug 2020, 06:36 AM

For now, I am using autoscaling to create a graph.  A user wanted an option to force Y axis to 0.   I created a checkbox, and when checked set minvalue to 0 in code behind.  Works great.

When the user unchecks the box because they don't like the 0 axis, how to I reset the graph to auto scaling, like it was before they checked the box?  It's a large dataset, so I would prefer not to destroy the chart and rebind if possible.

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter Milchev
Telerik team
answered on 25 Aug 2020, 01:29 PM

Hello Joel,

The MinValue property of the YAxis is a nullable decimal and the default value is null. With that said, setting the MinValue to null/Nothing should reset the scaling to auto.

Regards,
Peter Milchev
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Chart (HTML5)
Asked by
Joel
Top achievements
Rank 2
Answers by
Peter Milchev
Telerik team
Share this question
or