style(图表): 刻度值的数值格式,与指标的数值格式保持一致 #12339
This commit is contained in:
parent
ae075a7089
commit
9cb3911daf
@ -276,7 +276,10 @@ export class Gauge extends G2PlotChartView<GaugeOptions, G2Gauge> {
|
||||
return ''
|
||||
}
|
||||
if (gaugePercentLabel === false) {
|
||||
return v === '0' ? min : v === '1' ? max : min + (max - min) * v
|
||||
const resultV = v === '0' ? min : v === '1' ? max : min + (max - min) * v
|
||||
return labelFormatter.type === 'value'
|
||||
? valueFormatter(resultV, labelFormatter)
|
||||
: resultV
|
||||
}
|
||||
return v === '0' ? v : v * 100 + '%'
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user