Merge pull request #4299 from dataease/pr@dev@fix_map_tooltip_zero

fix(地图): 数据为0在提示中无法展示出来
This commit is contained in:
fit2cloud-chenyw 2023-01-05 15:34:34 +08:00 committed by GitHub
commit 014401e68b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@ export function baseMapOption(chart_option, chart, themeStyle, curAreaCode, seri
tooltip.formatter = params => {
const a = params.seriesName
const b = params.name
const c = params.value ? params.value : ''
const c = params.value ?? ''
return text.replace(new RegExp('{a}', 'g'), a).replace(new RegExp('{b}', 'g'), b).replace(new RegExp('{c}', 'g'), c)
}
chart_option.tooltip = tooltip