Skip to content

Commit

Permalink
Merge pull request #16736 from apache/fix-radius-splitLine
Browse files Browse the repository at this point in the history
fix(splitLine): fix chart throws errors when `splitLine` is enabled in radius axis.
  • Loading branch information
plainheart authored Mar 24, 2022
2 parents ad3a07a + 5b4ad88 commit c2f4ac6
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/component/axis/RadiusAxisView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ const axisElementBuilders: Record<typeof selfBuilderAttrs[number], AxisElementBu
shape: {
cx: polar.cx,
cy: polar.cy,
r: ticksCoords[i].coord
// ensure circle radius >= 0
r: Math.max(ticksCoords[i].coord, 0)
}
}));
}
Expand Down Expand Up @@ -225,4 +226,4 @@ function layoutAxis(polar: Polar, radiusAxisModel: RadiusAxisModel, axisAngle: n
};
}

export default RadiusAxisView;
export default RadiusAxisView;
1 change: 1 addition & 0 deletions test/runTest/actions/__meta__.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/runTest/actions/splitLine.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 60 additions & 2 deletions test/splitLine.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c2f4ac6

Please sign in to comment.