Merge pull request #10892 from dataease/pr@dev-v2@refactor_chart

Pr@dev v2@refactor chart
This commit is contained in:
wisonic-s 2024-07-10 19:35:54 +08:00 committed by GitHub
commit 3f7ff6a9b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 740 additions and 672 deletions

View File

@ -304,7 +304,7 @@ const boardMoveActive = computed(() => {
'symbolic-map',
'heat-map'
]
return CHARTS.includes(element.value.innerType)
return element.value.isPlugin || CHARTS.includes(element.value.innerType)
})
const dashboardActive = computed(() => {

View File

@ -94,7 +94,7 @@ const invokeMethod = param => {
if (pluginProxy.value['invokeMethod']) {
pluginProxy.value['invokeMethod'](param)
} else {
pluginProxy.value[param.methodName](param.args)
pluginProxy.value[param.methodName]?.(param.args)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -223,7 +223,7 @@ export const DEFAULT_MISC: ChartMiscAttr = {
id: '',
summary: ''
},
gaugeMax: 100,
gaugeMax: 1,
gaugeStartAngle: 225,
gaugeEndAngle: -45,
nameFontSize: 18,
@ -244,7 +244,7 @@ export const DEFAULT_MISC: ChartMiscAttr = {
nameFontShadow: false,
treemapWidth: 80,
treemapHeight: 80,
liquidMax: 100,
liquidMax: 1,
liquidMaxType: 'fix',
liquidMaxField: {
id: '',

View File

@ -2,6 +2,7 @@
import {
computed,
inject,
nextTick,
onBeforeUnmount,
onMounted,
PropType,
@ -393,6 +394,11 @@ const trackMenu = computed(() => {
})
const resizeAction = resizeColumn => {
//
if (myChart?.facet.timer) {
myChart?.facet.timer.stop()
nextTick(initScroll)
}
if (showPosition.value !== 'canvas') {
return
}

View File

@ -242,7 +242,7 @@ watch([() => resultMode.value], () => {
watch([() => scale.value], () => {
nextTick(() => {
chartComponent?.value?.renderChart(view.value)
chartComponent?.value?.renderChart?.(view.value)
})
})