fix(CircleProcessChart): abnormal ring thickness#424
fix(CircleProcessChart): abnormal ring thickness#424ader-h wants to merge 1 commit intoopentiny:devfrom
Conversation
WalkthroughRadius calculations in handleSeries.js are adjusted to reduce the constant subtracted from radii from 4 to 2 across multiple code paths, affecting setRadius, adaptive positioning, and computeMarkLine functions for inner ring sizing and mark line alignment. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/CircleProcessChart/handleSeries.js (1)
181-195:⚠️ Potential issue | 🟡 MinorAlign
actualBarWidthwith the new -2 correction.
For 2‑item radius arrays,actualBarWidthstill subtracts 4 while position now subtracts 2. This can make the mark line length slightly shorter than the corrected ring thickness. Consider updating it to keep the pointer length consistent with the new correction.🔧 Proposed fix
- actualBarWidth = outerRing - innerRing - 4; + actualBarWidth = outerRing - innerRing - 2;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/CircleProcessChart/handleSeries.js` around lines 181 - 195, In the branch handling a two-item radius array update the actualBarWidth calculation to use the same "-2" correction as position: set actualBarWidth = outerRing - innerRing - 2 (instead of -4) so that the computed mark line length matches the corrected ring thickness, and keep position computed as position = outerRing - 2 - (actualBarWidth / 4) * 3; adjust the code around actualBarWidth, outerRing, innerRing (and percentToDecimal/canvasRadius usage) accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@src/components/CircleProcessChart/handleSeries.js`:
- Around line 181-195: In the branch handling a two-item radius array update the
actualBarWidth calculation to use the same "-2" correction as position: set
actualBarWidth = outerRing - innerRing - 2 (instead of -4) so that the computed
mark line length matches the corrected ring thickness, and keep position
computed as position = outerRing - 2 - (actualBarWidth / 4) * 3; adjust the code
around actualBarWidth, outerRing, innerRing (and percentToDecimal/canvasRadius
usage) accordingly.
Summary by CodeRabbit
Release Notes