From d6e07577c01b797452bf61a716f7fa75367f5f36 Mon Sep 17 00:00:00 2001 From: junjie Date: Mon, 22 Mar 2021 14:04:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=A7=86=E5=9B=BE):=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E3=80=81=E5=9B=BE=E4=BE=8B=E7=9A=84=E6=A0=B7=E5=BC=8F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/chart.js | 1 + frontend/src/views/chart/chart/common/common.js | 1 + .../views/chart/components/component_style/TitleSelector.vue | 3 +++ 3 files changed, 5 insertions(+) diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js index fecdd4fdac..4b98b8af2d 100644 --- a/frontend/src/views/chart/chart/chart.js +++ b/frontend/src/views/chart/chart/chart.js @@ -17,6 +17,7 @@ export const DEFAULT_SIZE = { funnelWidth: 80 } export const DEFAULT_TITLE_STYLE = { + show: true, fontSize: '18', color: '#000000', hPosition: 'center', diff --git a/frontend/src/views/chart/chart/common/common.js b/frontend/src/views/chart/chart/common/common.js index 97d99c5919..3c764bb830 100644 --- a/frontend/src/views/chart/chart/common/common.js +++ b/frontend/src/views/chart/chart/common/common.js @@ -2,6 +2,7 @@ export function componentStyle(chart_option, chart) { if (chart.customStyle) { const customStyle = JSON.parse(chart.customStyle) if (customStyle.text) { + chart_option.title.show = customStyle.text.show chart_option.title.left = customStyle.text.hPosition chart_option.title.top = customStyle.text.vPosition const style = chart_option.title.textStyle ? chart_option.title.textStyle : {} diff --git a/frontend/src/views/chart/components/component_style/TitleSelector.vue b/frontend/src/views/chart/components/component_style/TitleSelector.vue index 80cae71733..6c38e0e5f5 100644 --- a/frontend/src/views/chart/components/component_style/TitleSelector.vue +++ b/frontend/src/views/chart/components/component_style/TitleSelector.vue @@ -8,6 +8,9 @@ > + + {{ $t('chart.show') }} +