From 61791c20a091d1d4a52daca426003d6b16ff0e38 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Tue, 30 Nov 2021 17:15:29 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=20=E6=B7=BB=E5=8A=A0=E5=85=AD?= =?UTF-8?q?=E6=96=B9=E5=9B=BE=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rightBox/chartRightBox/chartRightBox.scss | 7 +++++++ nezha-fronted/src/components/chart/chart.vue | 14 +++++++------- nezha-fronted/src/components/chart/panelChart.vue | 11 +++++------ nezha-fronted/src/components/chart/testData.js | 2 +- .../common/rightBox/chart/metricsChartConfig.vue | 2 +- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss b/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss index f48ef1dbc..801208c4b 100644 --- a/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss +++ b/nezha-fronted/src/assets/css/components/common/rightBox/chartRightBox/chartRightBox.scss @@ -3,6 +3,13 @@ .el-form { padding-top: 0px; } + .chart-title-config { + border: 1px solid $--border-color-light; + border-radius: 2px; + display: flex; + padding: 8px 10px; + justify-content: space-between; + } .chart-title .nz-icon-arrow-down{ display: inline-block; transition: transform .3s; diff --git a/nezha-fronted/src/components/chart/chart.vue b/nezha-fronted/src/components/chart/chart.vue index 007a19ca1..76e20dccd 100644 --- a/nezha-fronted/src/components/chart/chart.vue +++ b/nezha-fronted/src/components/chart/chart.vue @@ -8,13 +8,13 @@ :chart-info="chartInfo" :chart-option="chartOption" > - - - - - - - + diff --git a/nezha-fronted/src/components/chart/panelChart.vue b/nezha-fronted/src/components/chart/panelChart.vue index d0fee0b10..746e864af 100644 --- a/nezha-fronted/src/components/chart/panelChart.vue +++ b/nezha-fronted/src/components/chart/panelChart.vue @@ -105,12 +105,11 @@ export default { break } case 4: { - break - } - case 'hexagonFigure': { - this.getHexagonFigureData().then(res => { - this.chartData = res - }) + if (this.chartInfo.type === 'hexagonFigure') { + this.getHexagonFigureData().then(res => { + this.chartData = res + }) + } break } } diff --git a/nezha-fronted/src/components/chart/testData.js b/nezha-fronted/src/components/chart/testData.js index 3d7f01533..2b53d22ea 100644 --- a/nezha-fronted/src/components/chart/testData.js +++ b/nezha-fronted/src/components/chart/testData.js @@ -457,7 +457,7 @@ const chartData = { type: 'hexagonFigure', unit: 2, weight: 2, - dataSource: 'hexagonFigure', + dataSource: 4, param: '{' + ' "from":"module",' + ' "length":"48",' + diff --git a/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue index ebff6e581..570dbf371 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/metricsChartConfig.vue @@ -5,7 +5,7 @@ -
+