* UILineChart: 修复双Y轴时,数据为空,刷新出错的问题

This commit is contained in:
Sunny 2022-08-02 12:21:54 +08:00
parent 8211491bb9
commit 35c1714ac2

View File

@ -181,7 +181,7 @@ namespace Sunny.UI
{ {
get get
{ {
if (AllDataCount() == 0) return false; //if (AllDataCount() == 0) return false;
foreach (var series in Series.Values) foreach (var series in Series.Values)
{ {
if (series.IsY2) return true; if (series.IsY2) return true;
@ -234,6 +234,13 @@ namespace Sunny.UI
max = 1; max = 1;
} }
else else
{
if (AllDataCount() == 0)
{
min = 0;
max = 1;
}
else
{ {
min = double.MaxValue; min = double.MaxValue;
max = double.MinValue; max = double.MinValue;
@ -260,6 +267,7 @@ namespace Sunny.UI
} }
} }
} }
}
public void GetAllDataXRange(out double min, out double max) public void GetAllDataXRange(out double min, out double max)
{ {