forked from github/dataease
fix(图表): 修复在线地图在 Tab 组件中非第一个 Tab 页无法显示
This commit is contained in:
parent
1e6bb16fca
commit
a7bec1756e
@ -79,6 +79,11 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
|
|
||||||
async drawChart(drawOption: L7DrawConfig<L7Config>) {
|
async drawChart(drawOption: L7DrawConfig<L7Config>) {
|
||||||
const { chart, container } = drawOption
|
const { chart, container } = drawOption
|
||||||
|
const containerDom = document.getElementById(container)
|
||||||
|
const rect = containerDom?.getBoundingClientRect()
|
||||||
|
if (rect?.height <= 0) {
|
||||||
|
return new L7Wrapper(drawOption.chartObj?.getScene(), [])
|
||||||
|
}
|
||||||
const xAxis = deepCopy(chart.xAxis)
|
const xAxis = deepCopy(chart.xAxis)
|
||||||
const xAxisExt = deepCopy(chart.xAxisExt)
|
const xAxisExt = deepCopy(chart.xAxisExt)
|
||||||
const { basicStyle, misc } = deepCopy(parseJson(chart.customAttr))
|
const { basicStyle, misc } = deepCopy(parseJson(chart.customAttr))
|
||||||
|
@ -56,6 +56,11 @@ export class HeatMap extends L7ChartView<Scene, L7Config> {
|
|||||||
|
|
||||||
async drawChart(drawOption: L7DrawConfig<L7Config>) {
|
async drawChart(drawOption: L7DrawConfig<L7Config>) {
|
||||||
const { chart, container } = drawOption
|
const { chart, container } = drawOption
|
||||||
|
const containerDom = document.getElementById(container)
|
||||||
|
const rect = containerDom?.getBoundingClientRect()
|
||||||
|
if (rect?.height <= 0) {
|
||||||
|
return new L7Wrapper(drawOption.chartObj?.getScene(), [])
|
||||||
|
}
|
||||||
const xAxis = deepCopy(chart.xAxis)
|
const xAxis = deepCopy(chart.xAxis)
|
||||||
const yAxis = deepCopy(chart.yAxis)
|
const yAxis = deepCopy(chart.yAxis)
|
||||||
let basicStyle: DeepPartial<ChartBasicStyle>
|
let basicStyle: DeepPartial<ChartBasicStyle>
|
||||||
|
@ -81,6 +81,11 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
|
|
||||||
async drawChart(drawOption: L7DrawConfig<L7Config>) {
|
async drawChart(drawOption: L7DrawConfig<L7Config>) {
|
||||||
const { chart, container, action } = drawOption
|
const { chart, container, action } = drawOption
|
||||||
|
const containerDom = document.getElementById(container)
|
||||||
|
const rect = containerDom?.getBoundingClientRect()
|
||||||
|
if (rect?.height <= 0) {
|
||||||
|
return new L7Wrapper(drawOption.chartObj?.getScene(), [])
|
||||||
|
}
|
||||||
const xAxis = deepCopy(chart.xAxis)
|
const xAxis = deepCopy(chart.xAxis)
|
||||||
let basicStyle
|
let basicStyle
|
||||||
let miscStyle
|
let miscStyle
|
||||||
|
Loading…
Reference in New Issue
Block a user