mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 23:10:06 +00:00
修复数据在-1到1之间坐标轴显示错误问题
This commit is contained in:
@@ -353,7 +353,14 @@ namespace XCharts.Runtime
|
||||
}
|
||||
else if (string.IsNullOrEmpty(newNumericFormatter) && !isLog)
|
||||
{
|
||||
newNumericFormatter = MathUtil.IsInteger(maxValue) ? "f0" : "f" + MathUtil.GetPrecision(maxValue);
|
||||
if (Math.Abs(maxValue) >= Math.Abs(minValue))
|
||||
{
|
||||
newNumericFormatter = MathUtil.IsInteger(maxValue) ? "f0" : "f" + MathUtil.GetPrecision(maxValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
newNumericFormatter = MathUtil.IsInteger(minValue) ? "f0" : "f" + MathUtil.GetPrecision(minValue);
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(m_Formatter))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user