Merge pull request #11950 from dataease/pr@dev-v2@chart-line-fix

fix(图表): 修复移除指标及维度后重新添加无法显示图表内容的问题
This commit is contained in:
jianneng-fit2cloud 2024-09-03 13:21:42 +08:00 committed by GitHub
commit 7212f16773
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -97,7 +97,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) {
if (!chart.data?.data?.length) {
clearExtremum(chart)
return
}

View File

@ -49,7 +49,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) {
if (!chart.data?.data?.length) {
clearExtremum(chart)
return
}

View File

@ -212,7 +212,7 @@ export class StockLine extends G2PlotChartView<MixOptions, Mix> {
async drawChart(drawOptions: G2PlotDrawOptions<Mix>): Promise<Mix> {
const { chart, action, container } = drawOptions
if (!chart.data.data?.length) {
if (!chart.data?.data?.length) {
return
}
const xAxis = chart.xAxis