From 401bc91bfbe7a9c0251eae3749756d434fd2874c Mon Sep 17 00:00:00 2001 From: simaQ Date: Fri, 20 Mar 2020 18:21:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(axis):=20=E6=94=AF=E6=8C=81=E8=BD=AC?= =?UTF-8?q?=E7=BD=AE=E6=9E=81=E5=9D=90=E6=A0=87=E5=9D=90=E6=A0=87=E8=BD=B4?= =?UTF-8?q?=E7=9A=84=E6=B8=B2=E6=9F=93.=20Closed=20#1744?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chart/controller/axis.ts | 177 ++++++++++++++++++++++++++--------- src/util/grid.ts | 36 +++++-- tests/bugs/1744-spec.ts | 96 +++++++++++++++++++ 3 files changed, 254 insertions(+), 55 deletions(-) create mode 100644 tests/bugs/1744-spec.ts diff --git a/src/chart/controller/axis.ts b/src/chart/controller/axis.ts index 71eb31d930..76ff868367 100644 --- a/src/chart/controller/axis.ts +++ b/src/chart/controller/axis.ts @@ -1,4 +1,4 @@ -import { deepMix, each, get, map, mix } from '@antv/util'; +import { deepMix, each, get, isUndefined, map, mix } from '@antv/util'; import { COMPONENT_TYPE, DIRECTION, LAYER } from '../../constant'; import { CircleAxis, CircleGrid, IGroup, LineAxis, LineGrid, Scale } from '../../dependents'; import { AxisCfg, AxisOption, ComponentOption } from '../../interface'; @@ -78,21 +78,27 @@ export default class Axis extends Controller