forked from github/dataease
Merge pull request #12497 from dataease/pr@dev-v2@chart-extremum-fix
fix(图表): 修复通过时间过滤数据为空时,依然显示最值的问题 #12074
This commit is contained in:
commit
8a94c9810e
@ -97,6 +97,7 @@ export class Bar extends G2PlotChartView<ColumnOptions, Column> {
|
|||||||
async drawChart(drawOptions: G2PlotDrawOptions<Column>): Promise<Column> {
|
async drawChart(drawOptions: G2PlotDrawOptions<Column>): Promise<Column> {
|
||||||
const { chart, container, action } = drawOptions
|
const { chart, container, action } = drawOptions
|
||||||
if (!chart?.data?.data?.length) {
|
if (!chart?.data?.data?.length) {
|
||||||
|
chart.container = container
|
||||||
clearExtremum(chart)
|
clearExtremum(chart)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,7 @@ export class Area extends G2PlotChartView<AreaOptions, G2Area> {
|
|||||||
async drawChart(drawOptions: G2PlotDrawOptions<G2Area>): Promise<G2Area> {
|
async drawChart(drawOptions: G2PlotDrawOptions<G2Area>): Promise<G2Area> {
|
||||||
const { chart, container, action } = drawOptions
|
const { chart, container, action } = drawOptions
|
||||||
if (!chart.data?.data?.length) {
|
if (!chart.data?.data?.length) {
|
||||||
|
chart.container = container
|
||||||
clearExtremum(chart)
|
clearExtremum(chart)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,7 @@ export class Line extends G2PlotChartView<LineOptions, G2Line> {
|
|||||||
async drawChart(drawOptions: G2PlotDrawOptions<G2Line>): Promise<G2Line> {
|
async drawChart(drawOptions: G2PlotDrawOptions<G2Line>): Promise<G2Line> {
|
||||||
const { chart, action, container } = drawOptions
|
const { chart, action, container } = drawOptions
|
||||||
if (!chart.data?.data?.length) {
|
if (!chart.data?.data?.length) {
|
||||||
|
chart.container = container
|
||||||
clearExtremum(chart)
|
clearExtremum(chart)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user