Skip to content

feat: add PolarAngleAxis component storybook story#7243

Merged
PavelVanecek merged 1 commit into
recharts:mainfrom
whatfontisthis:feat/polar-angle-axis-story
May 28, 2026
Merged

feat: add PolarAngleAxis component storybook story#7243
PavelVanecek merged 1 commit into
recharts:mainfrom
whatfontisthis:feat/polar-angle-axis-story

Conversation

@whatfontisthis

@whatfontisthis whatfontisthis commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a comprehensive Storybook API story for the PolarAngleAxis component following the Line.stories.tsx pattern
  • Primary API export renders PolarAngleAxis inside a RadarChart (the main use case) with subjectData and all sibling components (PolarGrid, PolarRadiusAxis, Radar) to show real-world interactions
  • Secondary InRadialBarChart export demonstrates PolarAngleAxis in a RadialBarChart context with type="number" axis
  • All props flow through PolarAngleAxisArgs (auto-generated by npm run omnidoc) covering every prop from the API docs, with categories: General, Style, Events
  • Uses ResponsiveContainer, getStoryArgsFromArgsTypesObject, and RechartsHookInspector consistent with the established pattern

Closes #3742

Test plan

  • Run npm run omnidoc to generate storybook/stories/API/arg-types/PolarAngleAxisArgs.ts (auto-generated, gitignored)
  • Run npm run storybook and navigate to Polar > PolarAngleAxis > API story
  • Verify all props appear in the Storybook controls panel with correct types, defaults, and categories
  • Verify the radar chart renders with angle axis labels on the polygon outline
  • Navigate to Polar > PolarAngleAxis > InRadialBarChart and verify the radial bar chart variant
  • Toggle axisLineType between polygon and circle to confirm axis line shape changes
  • Toggle orientation between outer and inner to confirm tick label position changes

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated component usage examples to demonstrate PolarAngleAxis with RadarChart layout
    • Added new example showing PolarAngleAxis implementation with alternative chart type

Review Change Stack

Adds comprehensive Storybook API story for PolarAngleAxis covering all
props from the API docs, with a RadarChart (primary use case) and a
RadialBarChart variant. Follows the Line.stories.tsx pattern with
ResponsiveContainer, explicit args, and RechartsHookInspector.

Closes recharts#3742

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d772fe4c-2621-4258-ab64-c740540ebf29

📥 Commits

Reviewing files that changed from the base of the PR and between 34159e6 and 383e30e.

📒 Files selected for processing (1)
  • storybook/stories/API/polar/PolarAngleAxis.stories.tsx

Walkthrough

This PR updates the PolarAngleAxis Storybook story by refactoring the existing API story to render the component within a RadarChart context with supporting polar components, and adds a new InRadialBarChart story variant that renders PolarAngleAxis within a RadialBarChart, providing dual rendering examples for the component's usage patterns.

Changes

PolarAngleAxis Storybook Stories

Layer / File(s) Summary
Import updates for polar components
storybook/stories/API/polar/PolarAngleAxis.stories.tsx
Module imports expanded to include RadarChart, PolarGrid, PolarRadiusAxis, and ResponsiveContainer needed by updated story renderings.
API story refactor to RadarChart context
storybook/stories/API/polar/PolarAngleAxis.stories.tsx
API story render implementation changed from RadialBarChart to RadarChart with PolarGrid and PolarRadiusAxis, and args defaults expanded with explicit prop values for axis line type, orientation, ticks, stroke, and type behavior.
New InRadialBarChart story variant
storybook/stories/API/polar/PolarAngleAxis.stories.tsx
Added InRadialBarChart story that renders PolarAngleAxis within RadialBarChart, initializing args from getStoryArgsFromArgsTypesObject with explicit overrides for axisLineType and stroke.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • PavelVanecek
  • ckifer
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@codecov

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.07%. Comparing base (34159e6) to head (383e30e).
⚠️ Report is 84 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7243   +/-   ##
=======================================
  Coverage   89.07%   89.07%           
=======================================
  Files         539      539           
  Lines       41010    41010           
  Branches     5557     5558    +1     
=======================================
  Hits        36528    36528           
  Misses       4474     4474           
  Partials        8        8           

☔ 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

codecov Bot commented Apr 15, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@PavelVanecek
PavelVanecek marked this pull request as ready for review May 28, 2026 07:07
@PavelVanecek
PavelVanecek merged commit 9f925a5 into recharts:main May 28, 2026
52 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.

PolarAngleAxis Polar Story

2 participants