Merge pull request #13529 from dataease/pr@dev-v2@chart-gauge-style
style(图表): 仪表盘的刻度值的数值格式,与指标的数值格式保持一致 #12339
This commit is contained in:
commit
5f828f2093
@ -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