提交 950650e8 编写于 作者: tony001's avatar tony001

修复图表数据异常

上级 9ca3268e
...@@ -347,13 +347,13 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -347,13 +347,13 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
Object.keys(this.seriesModel).forEach((seriesName:string) =>{ Object.keys(this.seriesModel).forEach((seriesName:string) =>{
if(_chartOption && _chartOption.series.length > 0){ if(_chartOption && _chartOption.series.length > 0){
_chartOption.series.forEach((item:any) =>{ _chartOption.series.forEach((item:any) =>{
if(this.seriesModel[seriesName].ecxObject){ if(this.seriesModel[seriesName].ecxObject && Object.is(seriesName,item.id)){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecxObject); item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecxObject);
} }
if(this.seriesModel[seriesName].baseOption && Object.keys(this.seriesModel[seriesName].baseOption).length > 0){ if(this.seriesModel[seriesName].baseOption && Object.keys(this.seriesModel[seriesName].baseOption).length > 0 && Object.is(seriesName,item.id)){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].baseOption); item = Util.deepObjectMerge(item,this.seriesModel[seriesName].baseOption);
} }
if(this.seriesModel[seriesName].ecObject){ if(this.seriesModel[seriesName].ecObject && Object.is(seriesName,item.id)){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecObject); item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecObject);
} }
}) })
......
...@@ -347,13 +347,13 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -347,13 +347,13 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
Object.keys(this.seriesModel).forEach((seriesName:string) =>{ Object.keys(this.seriesModel).forEach((seriesName:string) =>{
if(_chartOption && _chartOption.series.length > 0){ if(_chartOption && _chartOption.series.length > 0){
_chartOption.series.forEach((item:any) =>{ _chartOption.series.forEach((item:any) =>{
if(this.seriesModel[seriesName].ecxObject){ if(this.seriesModel[seriesName].ecxObject && Object.is(seriesName,item.id)){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecxObject); item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecxObject);
} }
if(this.seriesModel[seriesName].baseOption && Object.keys(this.seriesModel[seriesName].baseOption).length > 0){ if(this.seriesModel[seriesName].baseOption && Object.keys(this.seriesModel[seriesName].baseOption).length > 0 && Object.is(seriesName,item.id)){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].baseOption); item = Util.deepObjectMerge(item,this.seriesModel[seriesName].baseOption);
} }
if(this.seriesModel[seriesName].ecObject){ if(this.seriesModel[seriesName].ecObject && Object.is(seriesName,item.id)){
item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecObject); item = Util.deepObjectMerge(item,this.seriesModel[seriesName].ecObject);
} }
}) })
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册