Merge pull request #12497 from dataease/pr@dev-v2@chart-extremum-fix

fix(图表): 修复通过时间过滤数据为空时,依然显示最值的问题 #12074
This commit is contained in:
jianneng-fit2cloud 2024-09-26 15:05:11 +08:00 committed by GitHub
commit 8a94c9810e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

View File

@ -97,6 +97,7 @@ export class Bar extends G2PlotChartView<ColumnOptions, Column> {
async drawChart(drawOptions: G2PlotDrawOptions<Column>): Promise<Column> {
const { chart, container, action } = drawOptions
if (!chart?.data?.data?.length) {
chart.container = container
clearExtremum(chart)
return
}

View File

@ -98,6 +98,7 @@ export class Area extends G2PlotChartView<AreaOptions, G2Area> {
async drawChart(drawOptions: G2PlotDrawOptions<G2Area>): Promise<G2Area> {
const { chart, container, action } = drawOptions
if (!chart.data?.data?.length) {
chart.container = container
clearExtremum(chart)
return
}

View File

@ -50,6 +50,7 @@ export class Line extends G2PlotChartView<LineOptions, G2Line> {
async drawChart(drawOptions: G2PlotDrawOptions<G2Line>): Promise<G2Line> {
const { chart, action, container } = drawOptions
if (!chart.data?.data?.length) {
chart.container = container
clearExtremum(chart)
return
}