update 配置文件

This commit is contained in:
2026-01-29 14:03:29 +08:00
parent 22a8be78c9
commit 740e1a1784

View File

@@ -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);
}