diff --git a/common/changes/@visactor/vrender-components/fix-fix-polar-angle-infinite-loop_2025-11-20-11-31.json b/common/changes/@visactor/vrender-components/fix-fix-polar-angle-infinite-loop_2025-11-20-11-31.json new file mode 100644 index 000000000..290e68957 --- /dev/null +++ b/common/changes/@visactor/vrender-components/fix-fix-polar-angle-infinite-loop_2025-11-20-11-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: fix bug of polar angle tick data loop\n\n", + "type": "none", + "packageName": "@visactor/vrender-components" + } + ], + "packageName": "@visactor/vrender-components", + "email": "lixuef1313@163.com" +} \ No newline at end of file diff --git a/common/changes/@visactor/vrender/fix-fix-polar-angle-infinite-loop_2025-11-20-11-31.json b/common/changes/@visactor/vrender/fix-fix-polar-angle-infinite-loop_2025-11-20-11-31.json new file mode 100644 index 000000000..d1ef97c57 --- /dev/null +++ b/common/changes/@visactor/vrender/fix-fix-polar-angle-infinite-loop_2025-11-20-11-31.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: fix bug of polar angle tick data loop\n\n", + "type": "none", + "packageName": "@visactor/vrender" + } + ], + "packageName": "@visactor/vrender", + "email": "lixuef1313@163.com" +} \ No newline at end of file diff --git a/packages/vrender-components/src/axis/tick-data/discrete/polar-angle.ts b/packages/vrender-components/src/axis/tick-data/discrete/polar-angle.ts index 8180b1184..d4c4b88f2 100644 --- a/packages/vrender-components/src/axis/tick-data/discrete/polar-angle.ts +++ b/packages/vrender-components/src/axis/tick-data/discrete/polar-angle.ts @@ -73,7 +73,7 @@ export const getPolarAngleLabelBounds = (scale: IBaseScale, domain: any[], op: I export const polarAngleAxisDiscreteTicks = (scale: BandScale, op: IPolarTickDataOpt): ITickData[] => { const { tickCount, forceTickCount, tickStep, getRadius, labelOffset, labelGap = 0, labelStyle } = op; const radius = getRadius?.(); - if (!radius) { + if (!radius || radius <= 0) { return convertDomainToTickData(scale.domain()); }