修复AxisLabel在数据都是小于1的浮点数时显示Label格式不对的问题

This commit is contained in:
monitor1394
2023-05-04 13:25:29 +08:00
parent 529c784ee2
commit 2d35f77740
2 changed files with 3 additions and 0 deletions

View File

@@ -39,6 +39,8 @@ namespace XCharts.Runtime
public static bool IsInteger(double value)
{
if (value == 0) return true;
if (value >= -1 && value <= 1) return false;
return Math.Abs(value % 1) <= (Double.Epsilon * 100);
}