Skip to content

fix(CircleProcessChart): abnormal ring thickness#424

Open
ader-h wants to merge 1 commit intoopentiny:devfrom
ader-h:fix-circleprocesschart-0224
Open

fix(CircleProcessChart): abnormal ring thickness#424
ader-h wants to merge 1 commit intoopentiny:devfrom
ader-h:fix-circleprocesschart-0224

Conversation

@ader-h
Copy link
Contributor

@ader-h ader-h commented Feb 24, 2026

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved visual rendering of circle process charts by fine-tuning inner ring dimensions and mark line positioning for better alignment and consistency.

@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

Walkthrough

Radius 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

Cohort / File(s) Summary
Radius Calculation Adjustments
src/components/CircleProcessChart/handleSeries.js
Reduces the constant subtracted from radius calculations from 4 to 2 in setRadius (for numeric, string, and array inputs), adaptive positioning branch, and computeMarkLine function, affecting inner ring dimensions and mark line positioning.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Hop, hop, circles shrink with grace,
From four to two, a tighter space,
The rings adjust their gentle way,
Proportions dance in display,
Smaller tweaks, bolder art! 🎪

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change: adjusting radius calculations to fix abnormal ring thickness in CircleProcessChart by reducing border width corrections.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🟡 Minor

Align actualBarWidth with the new -2 correction.
For 2‑item radius arrays, actualBarWidth still 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.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2d30e28 and 963f244.

📒 Files selected for processing (1)
  • src/components/CircleProcessChart/handleSeries.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant