Justin-ZS commented on code in PR #21579:
URL: https://github.com/apache/echarts/pull/21579#discussion_r3099200095
##########
src/component/axis/AngleAxisView.ts:
##########
@@ -138,23 +138,32 @@ interface AngleAxisElementBuilder {
const angelAxisElementsBuilders: Record<typeof elementList[number],
AngleAxisElementBuilder> = {
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]);
Review Comment:
Potential edge case: for category radius axes, computing boundaries via
`radiusAxis.scale.getExtent()` plus `radiusAxis.dataToCoord(...)` may shift
min/max line inward because `onBand` affects `dataToCoord`. Could we consider
using `radiusAxis.getExtent()` boundaries directly, or handling `onBand`
explicitly, so `axisLine.showMinLine/showMaxLine` stays aligned with axis
boundaries?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]