NEZ-3051 feat:dashboard 时序图表增加 tooltip配置

This commit is contained in:
zyh
2023-08-18 13:58:35 +08:00
parent e62c467144
commit a4a5ae3958
6 changed files with 184 additions and 40 deletions

View File

@@ -247,7 +247,8 @@ export default {
valueMapping: false,
thresholds: false,
visibility: false,
rightYAxis: false
rightYAxis: false,
tooltip: true
},
thresholdShow: true,
thresholds: [{ value: undefined, color: randomcolor() }],
@@ -266,7 +267,11 @@ export default {
min: undefined,
max: undefined
},
dataLink: []
dataLink: [],
tooltip: {
mode: 'all',
sort: 'none'
}
},
elements: [{ expression: '', legend: '', type: 'expert', id: '', name: 'A', state: 1, orderNum: 0 }],
panel: '',
@@ -607,14 +612,23 @@ export default {
if (this.chart.type === 'group' && !this.chart.param.collapse == undefined) {
this.chart.param.collapse = false
}
if ((this.chart.type === 'line' || this.chart.type === 'area' || this.chart.type === 'point') && !this.chart.param.rightYAxis) {
this.chart.param.rightYAxis = {
elementNames: [],
style: 'line',
unit: 2,
label: '',
min: undefined,
max: undefined
if (this.chart.type === 'line' || this.chart.type === 'area' || this.chart.type === 'point') {
if (!this.chart.param.rightYAxis) {
this.chart.param.rightYAxis = {
elementNames: [],
style: 'line',
unit: 2,
label: '',
min: undefined,
max: undefined
}
}
if (!this.chart.param.tooltip) {
this.chart.param.tooltip = {
mode: 'all',
sort: 'none'
}
this.chart.param.enable.tooltip = true
}
}
if (this.chart.type === 'stat') {
@@ -654,14 +668,23 @@ export default {
if (this.chart.type === 'group' && !this.chart.param.collapse == undefined) {
this.chart.param.collapse = false
}
if ((this.chart.type === 'line' || this.chart.type === 'area' || this.chart.type === 'point') && !this.chart.param.rightYAxis) {
this.chart.param.rightYAxis = {
elementNames: [],
style: 'line',
unit: 2,
label: '',
min: undefined,
max: undefined
if (this.chart.type === 'line' || this.chart.type === 'area' || this.chart.type === 'point') {
if (!this.chart.param.rightYAxis) {
this.chart.param.rightYAxis = {
elementNames: [],
style: 'line',
unit: 2,
label: '',
min: undefined,
max: undefined
}
}
if (!this.chart.param.tooltip) {
this.chart.param.tooltip = {
mode: 'all',
sort: 'none'
}
this.chart.param.enable.tooltip = true
}
}
if (this.chart.type === 'stat') {