forked from github/dataease
fix(图表): 修复移除指标及维度后重新添加无法显示图表内容的问题
This commit is contained in:
parent
ec6179318b
commit
6ac1ced6ef
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user