From 5efebb555efd984f3dd35de83e465cd53aaf8175 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 26 四月 2024 10:34:51 +0800 Subject: [PATCH] 完善左上角切换监测因子后,折线图联动切换功能 --- history.mode.js | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/history.mode.js b/history.mode.js index 0d2ead3..2f19c09 100644 --- a/history.mode.js +++ b/history.mode.js @@ -327,14 +327,18 @@ this.refreshLineChartData(); }, // 鍗曢�変竴涓洃娴嬪洜瀛愬睍绀烘姌绾垮浘 - choseOneFactorLineChart(index) { + choseOneFactorLineChart(factorType) { + let index = parseInt(factorType) - 1 for (let i = 0; i < this.historyDatas.datas.length; i++) { this.historyDatas.datas[i].show = false; this.historyDatas.physicalQuantity[i].show = false; + // if (this.historyDatas.datas[i].name == Util.factorName[factorName]) { + // index = i + // } } this.historyDatas.datas[index].show = true; this.historyDatas.physicalQuantity[index].show = true; - this.lineChartFactorType = [index]; + this.lineChartFactorType = [factorType]; CheckBox.refreshCheckBox( 'history_chart_factorbox', this.lineChartFactorType -- Gitblit v1.9.3