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 | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/history.mode.js b/history.mode.js index 2abbef0..2f19c09 100644 --- a/history.mode.js +++ b/history.mode.js @@ -196,7 +196,7 @@ this.drawMesh(false, this, this.factorDatas); } // 鎶樼嚎鍥鹃�変腑瀵瑰簲鍥犲瓙 - this.choseOneFactorLineChart(factorType) + this.choseOneFactorLineChart(factorType); // 琛ㄦ牸閫変腑瀵瑰簲鍥犲瓙 }, setFactorMode: function (factorMode) { @@ -327,14 +327,22 @@ 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 + ); this.refreshLineChartData(); }, // 鍒涘缓鍒濆鎶樼嚎鍥� -- Gitblit v1.9.3