Fixed y axis does not refresh when serie hidden

This commit is contained in:
monitor1394
2021-12-08 20:53:12 +08:00
parent d9a0f6f7f2
commit 8bf6f57012
3 changed files with 7 additions and 3 deletions

View File

@@ -41,6 +41,7 @@
## branch-2.0
* (2021.12.08) Fixed y axis does not refresh when serie hidden
* (2021.12.04) Added `Symbol` new types: `EmptyRect`, `EmptyTriangle`, `EmptyDiamond`
* (2021.12.04) Added setting symbol empty area color by itemStyle's backgroundColor
* (2021.12.03) Fixed formatter `{c}` not work #175

View File

@@ -41,6 +41,7 @@
## branch-2.0
* (2021.12.08) 修复`Serie`隐藏后`Y`轴最大值不刷新的问题
* (2021.12.04) 增加`Symbol`新类型:`EmptyRect`,`EmptyTriangle`,`EmptyDiamond`
* (2021.12.04) 增加`Symbol``Empty`区域颜色可通过`ItemStyle``backgroundColor`设置的支持
* (2021.12.03) 修复`Formatter``{c}`通配符不生效的问题 #175

View File

@@ -443,7 +443,8 @@ namespace XCharts
{
var serie = series.GetSerie(i);
if ((isPolar && serie.polarIndex != axisIndex)
|| (!isPolar && serie.yAxisIndex != axisIndex)) continue;
|| (!isPolar && serie.yAxisIndex != axisIndex)
|| !series.IsActive(i)) continue;
if (isPercentStack && SeriesHelper.IsPercentStack(series, serie.name, SerieType.Bar))
{
if (100 > max) max = 100;
@@ -485,7 +486,8 @@ namespace XCharts
{
var serie = ss.Value[i];
if ((isPolar && serie.polarIndex != axisIndex)
|| (!isPolar && serie.yAxisIndex != axisIndex)) continue;
|| (!isPolar && serie.yAxisIndex != axisIndex)
|| !series.IsActive(i)) continue;
var showData = serie.GetDataList(dataZoom);
if (SeriesHelper.IsPercentStack(series, serie.stack, SerieType.Bar))
{
@@ -510,7 +512,7 @@ namespace XCharts
currData = yValue ? showData[j].GetData(1) : showData[j].GetData(0);
}
if (inverse) currData = -currData;
if(!serie.IsIgnoreValue(currData))
if (!serie.IsIgnoreValue(currData))
_serieTotalValueForMinMax[j] = _serieTotalValueForMinMax[j] + currData;
}
}