完善数据处理

This commit is contained in:
lai
2024-11-19 14:09:37 +08:00
parent 2c9807f9b8
commit 68e002776c
2 changed files with 4 additions and 4 deletions

View File

@@ -186,7 +186,7 @@ type StateType = {
let state: StateType = reactive({ let state: StateType = reactive({
neType: [], neType: [],
chartRealTime: false, chartRealTime: false,
chartLegendSelectedFlag: false, chartLegendSelectedFlag: true,
}); });
// 存储每个指标的临时固定颜色 // 存储每个指标的临时固定颜色

View File

@@ -551,18 +551,18 @@ function fnRanderChartData() {
} }
for (const item of orgData) { for (const item of orgData) {
chartDataXAxisData.push(item['timeGroup']);
const keys = Object.keys(item); const keys = Object.keys(item);
for (const y of chartDataYSeriesData) { for (const y of chartDataYSeriesData) {
for (const key of keys) { for (const key of keys) {
if (y.key === key) { if (y.key === key) {
y.data.push(+item[key]); y.data.push(+item[key]);
chartDataXAxisData.push(item['timeGroup']);
} }
} }
} }
} }
// console.log(queryParams.sortOrder, chartLegendSelected); ///console.log(queryParams.sortOrder, chartDataXAxisData);
// console.log(chartDataXAxisData, chartDataYSeriesData); console.log(chartDataXAxisData, chartDataYSeriesData);
// 绘制图数据 // 绘制图数据
kpiChart.value.setOption( kpiChart.value.setOption(