修复无法正确表示部分超大或超小数值的问题

This commit is contained in:
monitor1394
2021-05-01 20:21:31 +08:00
parent 4e4f501e68
commit a7f1723559
13 changed files with 57 additions and 48 deletions

View File

@@ -40,8 +40,8 @@ namespace XCharts
#endif
protected override void GetSeriesMinMaxValue(Axis axis, int axisIndex, out float tempMinValue, out float tempMaxValue)
{
tempMinValue = int.MaxValue;
tempMaxValue = int.MinValue;
tempMinValue = float.MaxValue;
tempMaxValue = float.MinValue;
foreach (var serie in m_Series.list)
{
if (serie.type != SerieType.Gantt) continue;
@@ -57,9 +57,8 @@ namespace XCharts
}
}
}
if (tempMinValue == int.MaxValue) tempMinValue = 0;
if (tempMaxValue == int.MinValue) tempMaxValue = 0;
//AxisHelper.AdjustMinMaxValue(axis, ref tempMinValue, ref tempMaxValue, true, 60);
if (tempMinValue == float.MaxValue) tempMinValue = 0;
if (tempMaxValue == float.MinValue) tempMaxValue = 0;
}
protected override void OnRefreshLabel()