修复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

@@ -66,6 +66,7 @@ slug: /changelog
## master
* (2023.05.04) 修复`AxisLabel`在数据都是小于1的浮点数时显示`Label`格式不对的问题
* (2023.05.04) 修复`Theme`在修改默认主题的参数后运行被重置的问题
* (2023.05.04) 增加`Symbol`选择`Custom`类型时的`Warning`提示
* (2023.04.15) 修复`DataZoom`在多个图表时可能异常的问题 (#252)

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);
}