diff --git a/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue b/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue index 928cdd2e3..2da8cf32a 100644 --- a/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue +++ b/nezha-fronted/src/components/chart/chart/chartTimeSeries.vue @@ -182,18 +182,11 @@ export default { this.legends = [] this.series = chartOption.series = this.handleTimeSeries(this.chartInfo, chartOption.series[0], this.chartData) // 生成series和legends - const styleOption = this.$lodash.get(this.chartInfo, 'param.option', {}) chartOption.series.forEach(item => { - if (item.lineStyle && styleOption.lineWidth != undefined) { - item.lineStyle.width = styleOption.lineWidth - } else if (item.lineStyle) { + if (item.lineStyle) { item.lineStyle.width = this.lineOption.lineWidth } - if (styleOption.pointSize != undefined) { - item.symbolSize = styleOption.pointSize - } else { - item.symbolSize = this.lineOption.pointSize - } + item.symbolSize = this.lineOption.pointSize }) this.isGrey = this.legends.map(() => false) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/dashboardTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/dashboardTab.vue index 074cf42b0..f0a4b66f6 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/dashboardTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/dashboardTab.vue @@ -256,7 +256,6 @@ export default { mode: 'all', sort: 'none' }, - option: undefined }, elements: [{ expression: '', legend: '', type: 'expert', id: '', name: 'A', state: 1, orderNum: 0 }], panel: '', diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue index e6f550fe1..46ab45aa0 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/notebookTab.vue @@ -29,7 +29,7 @@
{{$t('notebook.downloadAs',{format:'PDF'})}}
-
{{$t('notebook.downloadAs',{format:'markdown'})}}
+
{{$t('notebook.downloadAs',{format:'markdown'})}}
{{$t('notebook.downloadNotebook')}} JSON
diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue index 048249feb..f2f83329c 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartConfig.vue @@ -403,44 +403,6 @@ - -
-
- {{$t('dashboard.dashboard.chartForm.option')}} -
-
- - - - - - - - -
-
-
@@ -1356,9 +1318,6 @@ export default { computed: { minStep () { return this.nzDefaultConfig.minStep - }, - lineOption () { - return this.nzDefaultConfig.option } }, data () { @@ -1459,8 +1418,7 @@ export default { tooltip: { mode: 'all', sort: 'none' - }, - option: this.lineOption + } } this.$nextTick(() => { this.chartConfig.param.thresholds.push({ value: undefined, color: randomcolor() }) diff --git a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue index 5dc3362da..851cfd08a 100644 --- a/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue +++ b/nezha-fronted/src/components/common/rightBox/chart/chartRightBox.vue @@ -175,9 +175,6 @@ export default { panelChart }, computed: { - lineOption () { - return this.nzDefaultConfig.option - }, chartLastPosition () { return this.$store.getters.getChartLastPosition }, @@ -418,8 +415,7 @@ export default { tooltip: { mode: 'all', sort: 'none' - }, - option: this.lineOption + } } } } @@ -462,8 +458,7 @@ export default { tooltip: { mode: 'all', sort: 'none' - }, - option: this.lineOption + } } } } else { @@ -694,8 +689,11 @@ export default { max: undefined } } - if (!obj.param.option) { - obj.param.option = this.lineOption + if (!obj.param.tooltip || !obj.param.tooltip.mode) { + obj.param.tooltip = { + mode: 'all', + sort: 'none' + } } } if (obj.type == 'table') { @@ -731,12 +729,6 @@ export default { delete item.chartId }) } - if (obj.param && (!obj.param.tooltip || !obj.param.tooltip.mode)) { - obj.param.tooltip = { - mode: 'all', - sort: 'none' - } - } this.editChart = this.$lodash.cloneDeep(obj) this.oldData = this.$lodash.cloneDeep(obj) if (this.stableTime) { diff --git a/nezha-fronted/src/components/page/dashboard/dashboard.vue b/nezha-fronted/src/components/page/dashboard/dashboard.vue index 3f1a82a66..7a7fa47b1 100644 --- a/nezha-fronted/src/components/page/dashboard/dashboard.vue +++ b/nezha-fronted/src/components/page/dashboard/dashboard.vue @@ -272,7 +272,6 @@ export default { mode: 'all', sort: 'none' }, - option: undefined }, elements: [{ expression: '', legend: '', type: 'expert', id: '', name: 'A', state: 1, orderNum: 0, step: undefined }], panel: '',