diff --git a/frontend/src/views/chart/components/ChartComponentG2.vue b/frontend/src/views/chart/components/ChartComponentG2.vue index 1c22f98532..447faf672e 100644 --- a/frontend/src/views/chart/components/ChartComponentG2.vue +++ b/frontend/src/views/chart/components/ChartComponentG2.vue @@ -2,7 +2,10 @@
@@ -12,7 +15,7 @@ import { baseLiquid } from '@/views/chart/chart/liquid/liquid' import { uuid } from 'vue-uuid' import ViewTrackBar from '@/components/canvas/components/Editor/ViewTrackBar' -import { hexColorToRGBA } from '@/views/chart/chart/util' +import { getRemark, hexColorToRGBA } from '@/views/chart/chart/util' import { baseBarOptionAntV, hBaseBarOptionAntV } from '@/views/chart/chart/bar/bar_antv' import { baseAreaOptionAntV, baseLineOptionAntV } from '@/views/chart/chart/line/line_antv' import { basePieOptionAntV, basePieRoseOptionAntV } from '@/views/chart/chart/pie/pie_antv' @@ -23,10 +26,11 @@ import { baseTreemapOptionAntV } from '@/views/chart/chart/treemap/treemap_antv' import { baseRadarOptionAntV } from '@/views/chart/chart/radar/radar_antv' import { baseWaterfallOptionAntV } from '@/views/chart/chart/waterfall/waterfall' import { baseWordCloudOptionAntV } from '@/views/chart/chart/wordCloud/word_cloud' +import TitleRemark from '@/views/chart/view/TitleRemark' export default { name: 'ChartComponentG2', - components: { ViewTrackBar }, + components: { TitleRemark, ViewTrackBar }, props: { chart: { type: Object, @@ -84,7 +88,11 @@ export default { title_show: true, antVRenderStatus: false, linkageActiveParam: null, - linkageActiveHistory: false + linkageActiveHistory: false, + remarkCfg: { + show: false, + content: '' + } } }, @@ -320,6 +328,7 @@ export default { this.borderRadius = (customStyle.background.borderRadius || 0) + 'px' } } + this.initRemark() }, calcHeightRightNow() { @@ -337,6 +346,9 @@ export default { setTimeout(() => { this.calcHeightRightNow() }, 100) + }, + initRemark() { + this.remarkCfg = getRemark(this.chart) } } } diff --git a/frontend/src/views/chart/components/ChartComponentS2.vue b/frontend/src/views/chart/components/ChartComponentS2.vue index 489f6b8f20..39426a84c6 100644 --- a/frontend/src/views/chart/components/ChartComponentS2.vue +++ b/frontend/src/views/chart/components/ChartComponentS2.vue @@ -2,7 +2,10 @@