From 282ba512b60db692144a0dec5f35af8793802b6e Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 9 Dec 2021 10:39:16 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=9B=BE=E8=A1=A8=20=E6=AF=8F=E6=AC=A1=E7=9A=84?= =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E8=89=B2=E9=83=BD=E6=98=AF=E4=B8=80=E6=A0=B7?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/chart/chart/chartBar.vue | 2 +- nezha-fronted/src/components/page/dashboard/panel.vue | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/chart/chart/chartBar.vue b/nezha-fronted/src/components/chart/chart/chartBar.vue index e10dfee46..a9d7c6274 100644 --- a/nezha-fronted/src/components/chart/chart/chartBar.vue +++ b/nezha-fronted/src/components/chart/chart/chartBar.vue @@ -80,7 +80,7 @@ export default { initChart (chartOption) { const self = this this.legends = [] - chartOption.series = this.initPieData(this.chartInfo, chartOption.series[0], this.chartData) // 生成series和legends + chartOption.series = this.initBarData(this.chartInfo, chartOption.series[0], this.chartData) // 生成series和legends chartOption.xAxis.data = chartOption.series.data.map(item => item.name) chartOption.axisLabel = { margin: 8, diff --git a/nezha-fronted/src/components/page/dashboard/panel.vue b/nezha-fronted/src/components/page/dashboard/panel.vue index ee2becd36..fd053d777 100644 --- a/nezha-fronted/src/components/page/dashboard/panel.vue +++ b/nezha-fronted/src/components/page/dashboard/panel.vue @@ -361,6 +361,7 @@ export default { /* 图表相关操作--start */ addChart () { this.chart = this.newChart() + this.chart.param.thresholds = [{ value: undefined, color: randomcolor() }] this.chart.panelId = this.showPanel.id this.chart.panelName = this.showPanel.name },