From 6f8135e7952ec2f4215c6ff179555c4130017995 Mon Sep 17 00:00:00 2001 From: Doma Date: Tue, 14 Jun 2022 19:49:52 +0800 Subject: [PATCH] refactor: apply axisLabel.show from thrme --- src/utils.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 0fe255c..3e184ff 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -228,9 +228,6 @@ const createOptions = { return _merge( { boundaryGap: !!series.find((comp: any) => comp.type[symbols.typeKey] === symbols.bars), - axisLabel: transformTextOption(axisLabel, { - show: true - }), splitLine: { show: false }, @@ -239,6 +236,11 @@ const createOptions = { color: '#575757' } }, + axisLabel + ? { + axisLabel: transformTextOption(axisLabel) + } + : {}, rest ); } @@ -262,9 +264,6 @@ const createOptions = { axisLine: { show: false }, - axisLabel: transformTextOption(axisLabel, { - show: true - }), splitLine: _merge( { show: !!splitLine @@ -278,6 +277,11 @@ const createOptions = { color: '#575757' } }, + axisLabel + ? { + axisLabel: transformTextOption(axisLabel) + } + : {}, rest ); }