forked from github/dataease
fix(图表-符号地图): 修复切换图表时,前端报错的问题,以及自定义提示无法换行的问题
This commit is contained in:
parent
21f3b2f58f
commit
67165e213d
@ -193,7 +193,8 @@ watch(
|
|||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
tooltipForm: {
|
tooltipForm: {
|
||||||
tooltipFormatter: DEFAULT_TOOLTIP.tooltipFormatter
|
tooltipFormatter: DEFAULT_TOOLTIP.tooltipFormatter,
|
||||||
|
carousel: DEFAULT_TOOLTIP.carousel
|
||||||
} as DeepPartial<ChartTooltipAttr>
|
} as DeepPartial<ChartTooltipAttr>
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
L7Wrapper
|
L7Wrapper
|
||||||
} from '@/views/chart/components/js/panel/types/impl/l7'
|
} from '@/views/chart/components/js/panel/types/impl/l7'
|
||||||
import { MAP_EDITOR_PROPERTY_INNER } from '@/views/chart/components/js/panel/charts/map/common'
|
import { MAP_EDITOR_PROPERTY_INNER } from '@/views/chart/components/js/panel/charts/map/common'
|
||||||
import { flow, hexColorToRGBA, parseJson } from '@/views/chart/components/js/util'
|
import { hexColorToRGBA, parseJson } from '@/views/chart/components/js/util'
|
||||||
import { deepCopy } from '@/utils/utils'
|
import { deepCopy } from '@/utils/utils'
|
||||||
import { GaodeMap } from '@antv/l7-maps'
|
import { GaodeMap } from '@antv/l7-maps'
|
||||||
import { Scene } from '@antv/l7-scene'
|
import { Scene } from '@antv/l7-scene'
|
||||||
@ -310,8 +310,4 @@ export class FlowMap extends L7ChartView<Scene, L7Config> {
|
|||||||
chart.customAttr.misc.flowMapConfig.lineConfig.mapLineAnimate = true
|
chart.customAttr.misc.flowMapConfig.lineConfig.mapLineAnimate = true
|
||||||
return chart
|
return chart
|
||||||
}
|
}
|
||||||
|
|
||||||
protected setupOptions(chart: Chart, config: L7Config): L7Config {
|
|
||||||
return flow(this.configEmptyDataStrategy)(chart, config)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
L7Wrapper
|
L7Wrapper
|
||||||
} from '@/views/chart/components/js/panel/types/impl/l7'
|
} from '@/views/chart/components/js/panel/types/impl/l7'
|
||||||
import { MAP_EDITOR_PROPERTY_INNER } from '@/views/chart/components/js/panel/charts/map/common'
|
import { MAP_EDITOR_PROPERTY_INNER } from '@/views/chart/components/js/panel/charts/map/common'
|
||||||
import { flow, hexColorToRGBA, parseJson } from '@/views/chart/components/js/util'
|
import { hexColorToRGBA, parseJson } from '@/views/chart/components/js/util'
|
||||||
import { deepCopy } from '@/utils/utils'
|
import { deepCopy } from '@/utils/utils'
|
||||||
import { GaodeMap } from '@antv/l7-maps'
|
import { GaodeMap } from '@antv/l7-maps'
|
||||||
import { Scene } from '@antv/l7-scene'
|
import { Scene } from '@antv/l7-scene'
|
||||||
@ -307,7 +307,7 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
buildTooltipContent = (tooltip, fieldData, showFields) => {
|
buildTooltipContent = (tooltip, fieldData, showFields) => {
|
||||||
let content = ''
|
let content = ``
|
||||||
if (tooltip.customContent) {
|
if (tooltip.customContent) {
|
||||||
content = tooltip.customContent
|
content = tooltip.customContent
|
||||||
showFields.forEach(field => {
|
showFields.forEach(field => {
|
||||||
@ -320,7 +320,7 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
}</span><br>`
|
}</span><br>`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return content
|
return content.replace(/\n/g, '<br>')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -394,8 +394,4 @@ export class SymbolicMap extends L7ChartView<Scene, L7Config> {
|
|||||||
}
|
}
|
||||||
return chart
|
return chart
|
||||||
}
|
}
|
||||||
|
|
||||||
protected setupOptions(chart: Chart, config: L7Config): L7Config {
|
|
||||||
return flow(this.configEmptyDataStrategy, this.configLabel)(chart, config)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -553,7 +553,7 @@ export class CarouselManager {
|
|||||||
}</span><br>`
|
}</span><br>`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return content
|
return content.replace(/\n/g, '<br>')
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 合并详情到 map
|
* 合并详情到 map
|
||||||
|
Loading…
Reference in New Issue
Block a user