mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
fix(图表): 修复仪表盘和水波图值为 0 时显示异常 #16419
This commit is contained in:
@@ -57,7 +57,7 @@ const gaugeLiquidYaxisValue = args => {
|
||||
const key = type === 'gauge' ? 'gaugeMax' : type === 'liquid' ? 'liquidMax' : null
|
||||
if (key) {
|
||||
gaugeLiquidYaxisDefaultValue[key] = cloneDeep(max)
|
||||
if (!state.miscForm[key]) {
|
||||
if (state.miscForm[key] === undefined || state.miscForm[key] === null) {
|
||||
state.miscForm[key] = gaugeLiquidYaxisDefaultValue[key]
|
||||
changeMisc()
|
||||
}
|
||||
|
||||
@@ -73,7 +73,9 @@ export class Liquid extends G2PlotChartView<LiquidOptions, G2Liquid> {
|
||||
})
|
||||
})
|
||||
// 处理空数据, 只要有一个指标是空数据,就不显示图表
|
||||
const hasNoneData = chart.data?.series.some(s => !s.data?.[0])
|
||||
const hasNoneData = chart.data?.series.some(
|
||||
s => s.data?.[0] === undefined || s.data?.[0] === null
|
||||
)
|
||||
this.configEmptyDataStyle(hasNoneData ? [] : [1], container, newChart)
|
||||
if (hasNoneData) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user