Skip to content

docs: add missing SVG props documentation to PolarGrid #3400#6987

Merged
PavelVanecek merged 3 commits intorecharts:mainfrom
ramanverse:fix-polargrid-documentation-3400
Mar 7, 2026
Merged

docs: add missing SVG props documentation to PolarGrid #3400#6987
PavelVanecek merged 3 commits intorecharts:mainfrom
ramanverse:fix-polargrid-documentation-3400

Conversation

@ramanverse
Copy link
Copy Markdown
Contributor

@ramanverse ramanverse commented Feb 10, 2026

This PR adds missing JSDoc documentation for common SVG properties in the PolarGrid component, as requested in #3400.

Summary of changes:

  • Added stroke, strokeWidth, strokeDasharray, fill, and fillOpacity to PolarGridProps with appropriate JSDoc comments.
  • Followed existing patterns from components like Line and CartesianGrid.

This improvement ensures these props are discoverable in the API documentation and via IDE intellisense.

Fixes #3400

Summary by CodeRabbit

  • New Features
    • Polar grid styling is now customizable: stroke color, stroke width, dash pattern, fill color, and fill opacity can be configured.
    • Sensible defaults for stroke, stroke width, and fill ensure consistent appearance out of the box while allowing full customization.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8870a3ff-d4bc-4624-889e-972b98acaddd

📥 Commits

Reviewing files that changed from the base of the PR and between 93231f0 and 116ba1b.

📒 Files selected for processing (1)
  • src/polar/PolarGrid.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/polar/PolarGrid.tsx

Walkthrough

Adds five public styling props to PolarGrid: stroke, strokeWidth, strokeDasharray, fill, and fillOpacity. Defaults for stroke, strokeWidth, and fill were added to defaultPolarGridProps. Internal hardcoded stroke/fill literals were removed; no control-flow or behavioral changes.

Changes

Cohort / File(s) Summary
PolarGrid Styling Props
src/polar/PolarGrid.tsx
Exposed styling props on PolarGridProps: stroke, strokeWidth, strokeDasharray, fill, fillOpacity. Added defaults (stroke, strokeWidth, fill) to defaultPolarGridProps. Removed internal hardcoded stroke/fill literals; strokeDasharray added to API but not yet wired into render logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • ckifer
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding missing SVG props documentation to PolarGrid, with reference to issue #3400.
Description check ✅ Passed The description adequately covers the purpose (adding JSDoc documentation for SVG properties), lists the specific changes (stroke, strokeWidth, strokeDasharray, fill, fillOpacity), mentions following existing patterns, and references the related issue.
Linked Issues check ✅ Passed The PR successfully addresses issue #3400 by adding JSDoc documentation for stroke, strokeWidth, strokeDasharray, fill, and fillOpacity properties to PolarGridProps, making them discoverable in API docs and IDE intellisense as requested.
Out of Scope Changes check ✅ Passed All changes are strictly related to documenting SVG properties on PolarGridProps; no unrelated modifications or functionality changes were introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 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.

@Yilun-Sun
Copy link
Copy Markdown
Member

Looks good overall, just one thing — CI is failing because of the cross-component JSDoc consistency test. The stroke comment on PolarGrid is "The stroke color." but Area/Line/ErrorBar all say "The stroke color. If "none", no line will be drawn." — the test requires >= 70% similarity across shared props. Matching the wording should fix it.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.63%. Comparing base (7ab9cb9) to head (116ba1b).
⚠️ Report is 82 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6987      +/-   ##
==========================================
- Coverage   90.10%   89.63%   -0.48%     
==========================================
  Files         522      534      +12     
  Lines       38844    40218    +1374     
  Branches     5347     5473     +126     
==========================================
+ Hits        35000    36049    +1049     
- Misses       3835     4161     +326     
+ Partials        9        8       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2026

Bundle Report

Changes will increase total bundle size by 33.9kB (1.18%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
recharts/bundle-cjs 1.29MB 33.9kB (2.7%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: recharts/bundle-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
state/selectors/axisSelectors.js 1.25kB 65.77kB 1.94%
cartesian/Area.js -158 bytes 29.18kB -0.54%
cartesian/Bar.js 976 bytes 28.81kB 3.51%
cartesian/Line.js 1.97kB 28.43kB 7.45% ⚠️
polar/Pie.js 1.55kB 27.57kB 5.96% ⚠️
cartesian/Scatter.js 75 bytes 24.35kB 0.31%
hooks.js -264 bytes 23.33kB -1.12%
cartesian/Funnel.js 116 bytes 19.03kB 0.61%
cartesian/CartesianAxis.js 1.27kB 18.75kB 7.24% ⚠️
index.js 774 bytes 14.83kB 5.51% ⚠️
synchronisation/useChartSynchronisation.js 147 bytes 13.04kB 1.14%
polar/PolarAngleAxis.js 305 bytes 12.95kB 2.41%
shape/Rectangle.js 23 bytes 12.34kB 0.19%
polar/PolarRadiusAxis.js 145 bytes 11.79kB 1.25%
util/scale/getNiceTickValues.js 2.64kB 11.74kB 29.02% ⚠️
cartesian/YAxis.js 181 bytes 11.15kB 1.65%
polar/PolarGrid.js -50 bytes 10.32kB -0.48%
cartesian/XAxis.js 181 bytes 9.7kB 1.9%
state/selectors/polarAxisSelectors.js 42 bytes 8.78kB 0.48%
state/selectors/combiners/combineTooltipPayload.js 1.33kB 8.67kB 18.18% ⚠️
state/cartesianAxisSlice.js 1.61kB 8.02kB 25.2% ⚠️
shape/Trapezoid.js 23 bytes 7.87kB 0.29%
component/DefaultLegendContent.js 244 bytes 7.65kB 3.29%
util/createCartesianCharts.js (New) 7.04kB 7.04kB 100.0% 🚀
component/TooltipBoundingBox.js 294 bytes 6.37kB 4.84%
util/createPolarCharts.js (New) 6.11kB 6.11kB 100.0% 🚀
util/ReduceCSSCalc.js 2 bytes 5.75kB 0.03%
zIndex/ZIndexLayer.js 2.24kB 5.38kB 71.33% ⚠️
state/store.js 118 bytes 4.84kB 2.5%
animation/CSSTransitionAnimate.js 186 bytes 2.79kB 7.16% ⚠️
state/selectors/combiners/combineConfiguredScale.js 6 bytes 2.47kB 0.24%
state/selectors/barStackSelectors.js 45 bytes 2.44kB 1.88%
animation/JavascriptAnimate.js 186 bytes 2.44kB 8.24% ⚠️
state/selectors/combiners/combineTooltipPayloadConfigurations.js 478 bytes 2.31kB 26.05% ⚠️
state/selectors/combiners/combineRealScaleType.js 45 bytes 1.72kB 2.69%
state/renderedTicksSlice.js (New) 1.49kB 1.49kB 100.0% 🚀
util/usePrefersReducedMotion.js (New) 1.24kB 1.24kB 100.0% 🚀
polar/defaultPolarAngleAxisProps.js 21 bytes 770 bytes 2.8%
polar/defaultPolarRadiusAxisProps.js 21 bytes 663 bytes 3.27%

@PavelVanecek PavelVanecek merged commit da8f31b into recharts:main Mar 7, 2026
41 of 42 checks passed
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.

Documentation missing: PolarGrid

3 participants