NEZ-3122 fix:Dashboard创建图表中Null Value选择connected时,图表效果显示不正确

This commit is contained in:
zhangyu
2023-08-23 10:21:06 +08:00
parent 1507c00d53
commit 713ba2ab59
3 changed files with 5 additions and 5 deletions

View File

@@ -501,7 +501,6 @@ export default {
} else if (item.yAxisIndex == 1) { } else if (item.yAxisIndex == 1) {
className = 'yAxis-icon nz-icon nz-icon-youzongzhou' className = 'yAxis-icon nz-icon nz-icon-youzongzhou'
} }
str += ` str += `
<div class="tooltip__row" title="${seriesName}"> <div class="tooltip__row" title="${seriesName}">
<div class="row__label"> <div class="row__label">
@@ -538,7 +537,6 @@ export default {
} }
color = self.stackTotalColorRight color = self.stackTotalColorRight
} }
str += ` str += `
<div class="tooltip__row"> <div class="tooltip__row">
<div class="row__label" title="${self.$t('dashboard.dashboard.chartTotal')}"> <div class="row__label" title="${self.$t('dashboard.dashboard.chartTotal')}">

View File

@@ -117,9 +117,8 @@ export default {
if (!this.dataLink.length) { if (!this.dataLink.length) {
s.cursor = 'default' s.cursor = 'default'
} }
if (chartInfo.param && chartInfo.param.nullType) {
if (s.param && s.param.nullType) { s.connectNulls = chartInfo.param.nullType !== 'null'
s.connectNulls = s.param.nullType !== 'null'
} else { } else {
s.connectNulls = false s.connectNulls = false
} }

View File

@@ -1061,6 +1061,9 @@ export function hideTableTooltip () {
/* 数字转换保留小数,数字很小时转为科学计数法, dot为保留几位小数 */ /* 数字转换保留小数,数字很小时转为科学计数法, dot为保留几位小数 */
export function formatScientificNotation (value, dot = 2) { export function formatScientificNotation (value, dot = 2) {
if (isNaN(value) || value === null) {
return value
}
let val = value ? parseFloat(Number(value).toFixed(dot)) : 0 let val = value ? parseFloat(Number(value).toFixed(dot)) : 0
if (val === 0) { if (val === 0) {
val = Number(value).toPrecision(dot + 1) val = Number(value).toPrecision(dot + 1)