Skip to content

Fix ZAxis not working in Storybook#6708

Merged
ckifer merged 1 commit intorecharts:mainfrom
taro-yanagiya:fix-zaxisid-storybook
Nov 30, 2025
Merged

Fix ZAxis not working in Storybook#6708
ckifer merged 1 commit intorecharts:mainfrom
taro-yanagiya:fix-zaxisid-storybook

Conversation

@taro-yanagiya
Copy link
Contributor

@taro-yanagiya taro-yanagiya commented Nov 30, 2025

Description

Fix ZAxis story not working in Storybook.

Current:

スクリーンショット 2025-11-30 9 39 44

Fixed:

スクリーンショット 2025-11-30 9 39 59

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • I have added a storybook story or VR test, or extended an existing story or VR test to show my changes

Summary by CodeRabbit

  • Chores
    • Added default Z-axis configuration to component story documentation, ensuring consistent default behavior across related stories.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 30, 2025

Walkthrough

A new default argument zAxisId: 0 was added to the API story's default arguments in the Storybook cartesian ZAxis configuration file.

Changes

Cohort / File(s) Summary
Storybook story configuration
storybook/stories/API/cartesian/ZAxis.stories.tsx
Added zAxisId: 0 to the exported API.args object as a default argument

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete; several template sections lack required details including Related Issue, Motivation and Context, and How Has This Been Tested. Add missing information: link a related issue, explain the motivation and root cause, and describe how the fix was tested in Storybook.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change—fixing the ZAxis story in Storybook—and is concise and specific.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d3ccaac and 4b2294a.

📒 Files selected for processing (1)
  • storybook/stories/API/cartesian/ZAxis.stories.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (DEVELOPING.md)

Run type checking on the codebase using npm run check-types

**/*.{ts,tsx}: Never use any type (implicit or explicit) in TypeScript code
Prefer unknown over any and refine the type in TypeScript
Type function parameters and return values explicitly in TypeScript, do not rely on implicit any or inference; exceptions are React components and trivial functions
Do not use as type assertions in TypeScript; the only exception is as const

Files:

  • storybook/stories/API/cartesian/ZAxis.stories.tsx
storybook/**/*.stories.{ts,tsx}

📄 CodeRabbit inference engine (DEVELOPING.md)

Use Storybook stories in the storybook directory for high-fidelity component examples that will be published and used for visual regression testing

Files:

  • storybook/stories/API/cartesian/ZAxis.stories.tsx
storybook/stories/**/*.stories.tsx

📄 CodeRabbit inference engine (CONTRIBUTING.md)

storybook/stories/**/*.stories.tsx: Use Storybook for smoke tests and add play functions with assertions for actual tests
Update Storybook stories when APIs have been changed to ensure they work as expected

Files:

  • storybook/stories/API/cartesian/ZAxis.stories.tsx
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Ensure code lints by running npm run lint and follows Airbnb's Style Guide

Files:

  • storybook/stories/API/cartesian/ZAxis.stories.tsx
🧠 Learnings (1)
📚 Learning: 2025-11-25T01:22:59.729Z
Learnt from: CR
Repo: recharts/recharts PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-11-25T01:22:59.729Z
Learning: Applies to storybook/stories/**/*.stories.tsx : Update Storybook stories when APIs have been changed to ensure they work as expected

Applied to files:

  • storybook/stories/API/cartesian/ZAxis.stories.tsx
🔇 Additional comments (1)
storybook/stories/API/cartesian/ZAxis.stories.tsx (1)

80-80: Unable to complete verification due to repository access failure.

The original review comment requests verification to check consistency with XAxis/YAxis stories and understand the getStoryArgsFromArgsTypesObject utility function behavior, but I cannot access the recharts repository to complete these checks. The web search indicates no publicly available function with this name exists, suggesting it may be internal to the recharts codebase.

The review approves the change but marks it as pending verification—verification results were never provided and cannot be obtained without codebase access.


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.

@taro-yanagiya taro-yanagiya changed the title Fix ZAxis not working by default in Storybook Fix ZAxis not working in Storybook Nov 30, 2025
@taro-yanagiya taro-yanagiya marked this pull request as ready for review November 30, 2025 00:42
@PavelVanecek
Copy link
Collaborator

Looks like the default value needs a fix too

@codecov
Copy link

codecov bot commented Nov 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.02%. Comparing base (10d58e9) to head (4b2294a).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6708   +/-   ##
=======================================
  Coverage   94.02%   94.02%           
=======================================
  Files         499      499           
  Lines       42547    42625   +78     
  Branches     4873     4892   +19     
=======================================
+ Hits        40004    40079   +75     
- Misses       2538     2541    +3     
  Partials        5        5           

☔ 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.

@ckifer ckifer merged commit 4d75305 into recharts:main Nov 30, 2025
22 checks passed
@taro-yanagiya taro-yanagiya deleted the fix-zaxisid-storybook branch November 30, 2025 08:21
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.

3 participants