From 5b4ad8859ba0510ccb569f3a8d262db059316fb1 Mon Sep 17 00:00:00 2001 From: plainheart Date: Thu, 24 Mar 2022 11:27:00 +0800 Subject: [PATCH] fix(splitLine): fix chart throws errors when `radiusAxis.splitLine` is enabled. --- src/component/axis/RadiusAxisView.ts | 5 ++- test/runTest/actions/__meta__.json | 1 + test/runTest/actions/splitLine.json | 1 + test/splitLine.html | 62 +++++++++++++++++++++++++++- 4 files changed, 65 insertions(+), 4 deletions(-) create mode 100644 test/runTest/actions/splitLine.json diff --git a/src/component/axis/RadiusAxisView.ts b/src/component/axis/RadiusAxisView.ts index 2cc5e7814a..b09dd50603 100644 --- a/src/component/axis/RadiusAxisView.ts +++ b/src/component/axis/RadiusAxisView.ts @@ -116,7 +116,8 @@ const axisElementBuilders: Record= 0 + r: Math.max(ticksCoords[i].coord, 0) } })); } @@ -225,4 +226,4 @@ function layoutAxis(polar: Polar, radiusAxisModel: RadiusAxisModel, axisAngle: n }; } -export default RadiusAxisView; \ No newline at end of file +export default RadiusAxisView; diff --git a/test/runTest/actions/__meta__.json b/test/runTest/actions/__meta__.json index 468dbfb821..1aa77623e2 100644 --- a/test/runTest/actions/__meta__.json +++ b/test/runTest/actions/__meta__.json @@ -163,6 +163,7 @@ "scatter-single-axis": 2, "scatterMatrix": 3, "setOption": 1, + "splitLine": 1, "stackBar-dataZoom": 7, "sunburst-book": 1, "sunburst-canvas": 1, diff --git a/test/runTest/actions/splitLine.json b/test/runTest/actions/splitLine.json new file mode 100644 index 0000000000..106e397bf0 --- /dev/null +++ b/test/runTest/actions/splitLine.json @@ -0,0 +1 @@ +[{"name":"Action 1","ops":[{"type":"mousedown","time":660,"x":50,"y":175},{"type":"mouseup","time":802,"x":50,"y":175},{"time":803,"delay":400,"type":"screenshot-auto"}],"scrollY":797.2000122070312,"scrollX":0,"timestamp":1648092272395}] \ No newline at end of file diff --git a/test/splitLine.html b/test/splitLine.html index 5a2fe742ae..ea847a07e8 100755 --- a/test/splitLine.html +++ b/test/splitLine.html @@ -41,7 +41,7 @@
- +
@@ -201,9 +201,67 @@ + - \ No newline at end of file +