From 1f33834146d0104882cf919271a28469588b430f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Fri, 29 Dec 2023 11:23:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84npm--location=E7=9A=84?= =?UTF-8?q?Throughput=E6=9B=B2=E7=BA=BF=E5=9B=BE=E7=9A=84legend=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/charts2/charts/npm/NpmLine.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/charts2/charts/npm/NpmLine.vue b/src/views/charts2/charts/npm/NpmLine.vue index ca40db20..40c27139 100644 --- a/src/views/charts2/charts/npm/NpmLine.vue +++ b/src/views/charts2/charts/npm/NpmLine.vue @@ -85,7 +85,7 @@ export default { data () { return { chartData: {}, - chartOptionLineData: dataForNpmLine.chartOptionLineData, + chartOptionLineData: [], npmLineColor: dataForNpmLine.npmLineColor, timer: null, myChartArray: [], @@ -140,6 +140,7 @@ export default { this.showError = false this.isNoData = res.data.result.length === 0 + this.chartOptionLineData = dataForNpmLine.chartOptionLineData if (!this.isNoData) { if (this.chart.params.index === 0) { res.data.result.forEach((t, i) => { @@ -181,7 +182,7 @@ export default { // this.chartOption.color = this.chartOption.color.reverse() // data = data.reverse() - this.chartOption.series = data.map((t, i) => { + this.chartOption.series = data.map(t => { return { type: 'line', symbol: 'circle', @@ -274,7 +275,7 @@ export default { }) if (legend.length === 0) { - chartOptionLineData.forEach((t, i) => { + chartOptionLineData.forEach(t => { t.invertTab = true }) }