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

图表名称代码表支持

上级 c7574ff6
...@@ -420,9 +420,18 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -420,9 +420,18 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
} }
}else{ }else{
// 序列属性存在时 // 序列属性存在时
let tempSeriesValueItem = tempSeriesValues.get(item[singleSeries.seriesIdField]); // 序列代码表存在时,翻译tempSeriesValues的键值对
if(!tempSeriesValueItem){ if(singleSeries.seriesCodeList){
tempSeriesValues.set(item[singleSeries.seriesIdField],item[singleSeries.seriesNameField]); const seriesCodeList:Map<string,any> = allCodeList.get(singleSeries.seriesCodeList.tag);
let tempSeriesValueItem = tempSeriesValues.get(seriesCodeList.get(item[singleSeries.seriesIdField]));
if(!tempSeriesValueItem){
tempSeriesValues.set(seriesCodeList.get(item[singleSeries.seriesIdField]),seriesCodeList.get(item[singleSeries.seriesIdField]));
}
}else{
let tempSeriesValueItem = tempSeriesValues.get(item[singleSeries.seriesIdField]);
if(!tempSeriesValueItem){
tempSeriesValues.set(item[singleSeries.seriesIdField],item[singleSeries.seriesNameField]);
}
} }
Object.assign(tempChartSetDataItem,{name:item[singleSeries.seriesIdField]}); Object.assign(tempChartSetDataItem,{name:item[singleSeries.seriesIdField]});
if(singleSeries.dataSetFields && singleSeries.dataSetFields.length >0){ if(singleSeries.dataSetFields && singleSeries.dataSetFields.length >0){
...@@ -435,6 +444,14 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char ...@@ -435,6 +444,14 @@ import { ChartDataSetField,ChartLineSeries,ChartFunnelSeries,ChartPieSeries,Char
}) })
// 补全数据集合 // 补全数据集合
this.completeDataSet(tempChartSetData,singleSeries,allCodeList); this.completeDataSet(tempChartSetData,singleSeries,allCodeList);
// 序列代码表存在时,补全序列
if(singleSeries.seriesCodeList){
const seriesCodeList:Map<string,any> = allCodeList.get(singleSeries.seriesCodeList.tag);
tempSeriesValues = new Map();
seriesCodeList.forEach((item:any) =>{
tempSeriesValues.set(item,item);
})
}
singleSeries.seriesValues = [...tempSeriesValues.keys()]; singleSeries.seriesValues = [...tempSeriesValues.keys()];
let tempSeriesMapObj:any = {}; let tempSeriesMapObj:any = {};
tempSeriesValues.forEach((value:any,key:any) =>{ tempSeriesValues.forEach((value:any,key:any) =>{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册