Chart: [Android] An exception is thrown when resetting numeric axis with Maximum smaller than the previous axis' Minimum
An exception is thrown on Android when this code is executed
this.chart1.VerticalAxis = new NumericalAxis { Minimum = 300, Maximum = 400 }; this.chart1.VerticalAxis = new NumericalAxis { Minimum = 100, Maximum = 200 };
3 comments
ADMIN
Georgi
Posted on:17 Feb 2021 08:55
Hello,
This item is available in latest internal build - LIB 2021.1.216 (16/2/2021)) and it will be also available in the next official release. You can find the LIB as a prerelease nuget or download the assemblies from your account.
Regards,
Georgi
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Prasanth
Posted on:03 Jan 2021 04:03
Corrected the code: this.chart1.VerticalAxis = null;
if (plotMinValue < plotMaxValue)
{
this.chart1.VerticalAxis = new NumericalAxis { Minimum = plotMinValue, Maximum = plotMaxValue };
}
elseif (plotMaxValue < plotMinValue)
{
this.chart1.VerticalAxis = new NumericalAxis { Minimum = plotMaxValue, Maximum = plotMinValue };
}
Prasanth
Posted on:03 Jan 2021 04:02
As a work-around, one can use the below approach to identify which is minimum and set the minimum value first to the chart before setting the max value.
this.chart1.VerticalAxis = null;
if (plotMinValue < plotMaxValue)
{
this.chart1.VerticalAxis = new NumericalAxis { Minimum = plotMinValue, Maximum = plotMaxValue };
}
elseif (v2 < v1)
{
this.chart1.VerticalAxis = new NumericalAxis { Minimum = plotMaxValue, Maximum = plotMinValue };
}
Remember, to set the Minimum value first in the Numerical Axis in the order .