From a4d803f6c0bffc9d6b3abd385111682d7b5d7de5 Mon Sep 17 00:00:00 2001 From: hxada Date: Thu, 4 Jul 2024 14:13:58 +0800 Subject: [PATCH] feature(axis): add feature to remove SplitLine on specified tick --- src/component/axis/CartesianAxisView.ts | 11 +++- src/coord/Axis.ts | 4 +- src/coord/axisCommonTypes.ts | 6 +- src/coord/axisDefault.ts | 2 + test/axis-splitLine.html | 83 +++++++++++++++++++++++++ 5 files changed, 101 insertions(+), 5 deletions(-) create mode 100644 test/axis-splitLine.html diff --git a/src/component/axis/CartesianAxisView.ts b/src/component/axis/CartesianAxisView.ts index 3cc48e3041..abc3e8cff7 100644 --- a/src/component/axis/CartesianAxisView.ts +++ b/src/component/axis/CartesianAxisView.ts @@ -123,6 +123,8 @@ const axisElementBuilders: Record boolean) + interval?: 'auto' | number | ((index:number, value: string) => boolean), + // true | false + showMinLine?: boolean, + // true | false + showMaxLine?: boolean, // colors will display in turn lineStyle?: LineStyleOption } diff --git a/src/coord/axisDefault.ts b/src/coord/axisDefault.ts index 4d2c6674b3..ae589f365a 100644 --- a/src/coord/axisDefault.ts +++ b/src/coord/axisDefault.ts @@ -93,6 +93,8 @@ const defaultOption: AxisBaseOption = { }, splitLine: { show: true, + showMinLine: true, + showMaxLine: true, lineStyle: { color: ['#E0E6F1'], width: 1, diff --git a/test/axis-splitLine.html b/test/axis-splitLine.html new file mode 100644 index 0000000000..2dfd1a320d --- /dev/null +++ b/test/axis-splitLine.html @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + +
+ + + + + +