修复AxisValue轴在某些情况下计算数值范围不准确的问题

This commit is contained in:
monitor1394
2022-12-12 13:41:04 +08:00
parent ce1691e1ce
commit a5aa630b74
2 changed files with 2 additions and 1 deletions

View File

@@ -713,7 +713,7 @@ namespace XCharts.Runtime
}
if (ceilRate == 0)
{
var bigger = Math.Floor(Math.Abs(min));
var bigger = min < 0 ? Math.Ceiling(Math.Abs(min)) : Math.Floor(Math.Abs(min));
int n = 1;
while (bigger / (Mathf.Pow(10, n)) > 10)
{