From 5bd60012c2e8c47bf2dabca6c91f72e9a638bf49 Mon Sep 17 00:00:00 2001 From: Sebastian Ludwig Date: Mon, 13 Apr 2026 23:21:35 +0200 Subject: [PATCH 1/4] fix(axis): Support showMinLine/showMaxLine for radius axis. --- src/component/axis/RadiusAxisView.ts | 5 ++ test/axis-splitLine.html | 108 +++++++++++++++++---------- 2 files changed, 75 insertions(+), 38 deletions(-) diff --git a/src/component/axis/RadiusAxisView.ts b/src/component/axis/RadiusAxisView.ts index f1c3f464c3..5b8cea4ab2 100644 --- a/src/component/axis/RadiusAxisView.ts +++ b/src/component/axis/RadiusAxisView.ts @@ -101,6 +101,8 @@ const axisElementBuilders: Record -
+
+
- From 3d3af25f282ef90d85c91bdea4d8b8b987588eb2 Mon Sep 17 00:00:00 2001 From: Sebastian Ludwig Date: Tue, 14 Apr 2026 08:16:53 +0200 Subject: [PATCH 2/4] fix(axis): Support showMinLine/showMaxLine for angle axis. --- src/component/axis/AngleAxisView.ts | 5 +++++ test/axis-splitLine.html | 35 +++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/component/axis/AngleAxisView.ts b/src/component/axis/AngleAxisView.ts index a694c4e491..ec5d46ac16 100644 --- a/src/component/axis/AngleAxisView.ts +++ b/src/component/axis/AngleAxisView.ts @@ -311,6 +311,8 @@ const angelAxisElementsBuilders: Record
+
From c1b6b5977448c6d5f0b7ca35c21740139c8e8cf9 Mon Sep 17 00:00:00 2001 From: Sebastian Ludwig Date: Tue, 14 Apr 2026 08:18:22 +0200 Subject: [PATCH 3/4] fix(axis): Support showMinLine/showMaxLine for single axis. --- src/component/axis/SingleAxisView.ts | 5 +++++ test/axis-splitLine.html | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/component/axis/SingleAxisView.ts b/src/component/axis/SingleAxisView.ts index 2443fdc09f..dad8fa2cac 100644 --- a/src/component/axis/SingleAxisView.ts +++ b/src/component/axis/SingleAxisView.ts @@ -96,6 +96,8 @@ const axisElementBuilders: Record
+
From 274cb4aa7570cdede7b487c8584b2ff155976bd1 Mon Sep 17 00:00:00 2001 From: Sebastian Ludwig Date: Tue, 14 Apr 2026 12:51:36 +0200 Subject: [PATCH 4/4] feat(axis): Add support for showMinLine/showMaxLine to polar angle axis --- src/component/axis/AngleAxisView.ts | 52 +++++---- src/component/polar/install.ts | 7 +- src/coord/polar/AxisModel.ts | 8 +- test/axis-axisLine.html | 157 ++++++++++++++++++++++++++++ 4 files changed, 199 insertions(+), 25 deletions(-) create mode 100644 test/axis-axisLine.html diff --git a/src/component/axis/AngleAxisView.ts b/src/component/axis/AngleAxisView.ts index ec5d46ac16..10250136df 100644 --- a/src/component/axis/AngleAxisView.ts +++ b/src/component/axis/AngleAxisView.ts @@ -138,23 +138,32 @@ interface AngleAxisElementBuilder { const angelAxisElementsBuilders: Record = { axisLine(group, angleAxisModel, polar, ticksAngles, minorTickAngles, radiusExtent) { + const axisLineModel = angleAxisModel.getModel('axisLine'); const lineStyleModel = angleAxisModel.getModel(['axisLine', 'lineStyle']); const angleAxis = polar.getAngleAxis(); + const radiusAxis = polar.getRadiusAxis(); const RADIAN = Math.PI / 180; const angleExtent = angleAxis.getExtent(); - - // extent id of the axis radius (r0 and r) - const rId = getRadiusIdx(polar); - const r0Id = rId ? 0 : 1; - let shape; + const showMinLine = axisLineModel.get('showMinLine') !== false; + const showMaxLine = axisLineModel.get('showMaxLine') !== false; const shapeType = Math.abs(angleExtent[1] - angleExtent[0]) === 360 ? 'Circle' : 'Arc'; + const radiusDataExtent = radiusAxis.scale.getExtent(); + const minRadius = radiusAxis.dataToCoord(radiusDataExtent[0]); + const maxRadius = radiusAxis.dataToCoord(radiusDataExtent[1]); - if (radiusExtent[r0Id] === 0) { - shape = new graphic[shapeType]({ + if (!showMinLine && !showMaxLine) { + return; + } + + const addBoundaryLine = (radius: number) => { + if (!isFinite(radius)) { + return; + } + const shape = new graphic[shapeType]({ shape: { cx: polar.cx, cy: polar.cy, - r: radiusExtent[rId], + r: Math.max(radius, 0), startAngle: -angleExtent[0] * RADIAN, endAngle: -angleExtent[1] * RADIAN, clockwise: angleAxis.inverse @@ -163,22 +172,21 @@ const angelAxisElementsBuilders: Record & { + showMinLine?: boolean; + showMaxLine?: boolean; + } }; export type RadiusAxisOption = AxisBaseOption & { @@ -86,4 +90,4 @@ export class RadiusAxisModel extends PolarAxisModel { static type = 'radiusAxis'; type = RadiusAxisModel.type; axis: RadiusAxis; -} \ No newline at end of file +} diff --git a/test/axis-axisLine.html b/test/axis-axisLine.html new file mode 100644 index 0000000000..aa9f0569c6 --- /dev/null +++ b/test/axis-axisLine.html @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + +
+
+
+
+
+ + + +