From b10bc2edc4231f2621ff9eebc7ef6df84f0d37e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Mon, 27 Jun 2022 21:35:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=20X=E8=BD=B4=20/=20Y?= =?UTF-8?q?=E8=BD=B4=20=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E3=80=81?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pages/ChartItemSetting/GlobalSetting.vue | 62 ++++++++++++++++++- src/packages/public/chart.ts | 8 +-- src/settings/chartThemes/global.theme.json | 14 ++++- 3 files changed, 74 insertions(+), 10 deletions(-) diff --git a/src/components/Pages/ChartItemSetting/GlobalSetting.vue b/src/components/Pages/ChartItemSetting/GlobalSetting.vue index 8946fb6c..0548cfc4 100644 --- a/src/components/Pages/ChartItemSetting/GlobalSetting.vue +++ b/src/components/Pages/ChartItemSetting/GlobalSetting.vue @@ -47,13 +47,30 @@ size="small" > - + + + + + + + + + + @@ -70,6 +87,13 @@ v-model:value="xAxis.axisLabel.color" > + + + @@ -93,6 +117,11 @@ > + + + + + @@ -155,13 +184,30 @@ size="small" > - + + + + + + + + + + @@ -178,6 +224,13 @@ v-model:value="yAxis.axisLabel.color" > + + + @@ -206,6 +259,11 @@ > + + + + + diff --git a/src/packages/public/chart.ts b/src/packages/public/chart.ts index 84f3f061..d36a850e 100644 --- a/src/packages/public/chart.ts +++ b/src/packages/public/chart.ts @@ -10,12 +10,8 @@ import { globalThemeJson } from '@/settings/chartThemes/index' * @param excludes 排除元素 * @returns object */ -export const mergeTheme = ( - option: T, - themeSetting: U, - includes: string[] -) => { - return option = merge({}, pick(themeSetting, includes), option) +export const mergeTheme = (option: T, themeSetting: U, includes: string[]) => { + return (option = merge({}, pick(themeSetting, includes), option)) } /** diff --git a/src/settings/chartThemes/global.theme.json b/src/settings/chartThemes/global.theme.json index 410700c7..d7b2a61f 100644 --- a/src/settings/chartThemes/global.theme.json +++ b/src/settings/chartThemes/global.theme.json @@ -12,11 +12,16 @@ }, "xAxis": { "show": true, + "name": "", + "nameGap": 15, "nameTextStyle": { - "color": "#B9B8CE" + "color": "#B9B8CE", + "fontSize": 12 }, + "inverse": false, "axisLabel": { "show": true, + "fontSize": 12, "color": "#B9B8CE" }, "position": "bottom", @@ -42,11 +47,16 @@ }, "yAxis": { "show": true, + "name": "", + "nameGap": 15, "nameTextStyle": { - "color": "#B9B8CE" + "color": "#B9B8CE", + "fontSize": 12 }, + "inverse": false, "axisLabel": { "show": true, + "fontSize": 12, "color": "#B9B8CE" }, "position": "left",