update 配置文件
This commit is contained in:
@@ -456,20 +456,10 @@ const lineChart = (
|
||||
},
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '',
|
||||
type: 'line',
|
||||
data: [],
|
||||
lineStyle: {
|
||||
width: 2,
|
||||
},
|
||||
},
|
||||
],
|
||||
series: [],
|
||||
};
|
||||
mergeObjArrItem(option, yAxis, 'yAxis');
|
||||
mergeObjArrItem(option, xAxis, 'xAxis');
|
||||
mergeObjArrItem(option, series, 'series');
|
||||
mergeObjItem(option, grid, 'grid');
|
||||
mergeObjItem(option, title, 'title');
|
||||
mergeObjItem(option, legend, 'legend');
|
||||
@@ -478,13 +468,13 @@ const lineChart = (
|
||||
if (color) {
|
||||
option.color = color;
|
||||
}
|
||||
// option.series =
|
||||
// series.map((item: any) => {
|
||||
// if (!Reflect.has(item, 'type')) {
|
||||
// item.type = 'line';
|
||||
// }
|
||||
// return item;
|
||||
// }) ?? [];
|
||||
option.series =
|
||||
series.map((item: any) => {
|
||||
if (!Reflect.has(item, 'type')) {
|
||||
item.type = 'line';
|
||||
}
|
||||
return item;
|
||||
}) ?? [];
|
||||
if (option) {
|
||||
myChart[id].setOption(option);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user