CN-465 fix: npm单值图问题修复

This commit is contained in:
chenjinsong
2022-04-07 14:53:13 +08:00
parent 429ca0653f
commit 051af32d6e
4 changed files with 26 additions and 37 deletions

View File

@@ -244,12 +244,12 @@ export default {
if (chartParams && chartParams.dataKey) {
if (response.data.result && (response.data.result[chartParams.dataKey] || response.data.result[chartParams.dataKey] === 0)) {
this.chartData = response.data.result[chartParams.dataKey]
} else if (response.data.result && (response.data.result[chartParams.dataKey + 'Avg'] || response.data.result[chartParams.dataKey + 'Avg'] === 0)) {
this.chartData = [{
value: response.data.result[chartParams.dataKey + 'Avg'],
} else if (response.data.result && (response.data.result[chartParams.dataKey + 'Value'] || response.data.result[chartParams.dataKey + 'Value'] === 0)) {
this.chartData = {
value: response.data.result[chartParams.dataKey + 'Value'],
p50: response.data.result[chartParams.dataKey + 'P50'],
p90: response.data.result[chartParams.dataKey + 'P90']
}]
}
} else {
this.chartData = null
}