mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 17:30:10 +00:00
修复数据过小时AxisLabel直接科学计数法显示的问题
This commit is contained in:
@@ -154,7 +154,8 @@ namespace XCharts
|
||||
{
|
||||
int minAcc = ChartHelper.GetFloatAccuracy(minValue);
|
||||
int maxAcc = ChartHelper.GetFloatAccuracy(maxValue);
|
||||
int acc = Mathf.Max(minAcc, maxAcc);
|
||||
int curAcc = ChartHelper.GetFloatAccuracy(value);
|
||||
int acc = Mathf.Max(Mathf.Max(minAcc, maxAcc), curAcc);
|
||||
return ChartCached.FloatToStr(value, acc, m_ForceENotation);
|
||||
}
|
||||
else if (value - (int)value == 0)
|
||||
@@ -181,7 +182,9 @@ namespace XCharts
|
||||
content = content.Replace("\\n", "\n");
|
||||
content = content.Replace("<br/>", "\n");
|
||||
return content;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
return value.ToString(m_Formatter);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace XCharts
|
||||
[SerializeField] private float m_Duration = 1000;
|
||||
[SerializeField] private int m_Threshold = 2000;
|
||||
[SerializeField] private float m_Delay = 0;
|
||||
[SerializeField] private bool m_UpdateAnimation = false;
|
||||
[SerializeField] private bool m_UpdateAnimation = true;
|
||||
[SerializeField] private float m_UpdateDuration = 500;
|
||||
[SerializeField] private float m_ActualDuration;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user