Merge pull request #13922 from dataease/pr@dev-v2@chart-gauge-fix

fix(图表): 修复仪表盘最大值为空的问题
This commit is contained in:
jianneng-fit2cloud 2024-12-09 19:10:30 +08:00 committed by GitHub
commit 3c6e028f33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,7 +133,9 @@ export class Gauge extends G2PlotChartView<GaugeOptions, G2Gauge> {
max = misc.gaugeMax ? misc.gaugeMax : DEFAULT_MISC.gaugeMax
} else {
min = misc.gaugeMin || misc.gaugeMin === 0 ? misc.gaugeMin : DEFAULT_MISC.gaugeMin
max = misc.gaugeMax ? misc.gaugeMax : DEFAULT_MISC.gaugeMax
max = misc.gaugeMax
? misc.gaugeMax
: chart.data?.series[chart.data?.series.length - 1]?.data[0]
}
startAngle = (misc.gaugeStartAngle * Math.PI) / 180
endAngle = (misc.gaugeEndAngle * Math.PI) / 180