Skip to content

Add width 'auto' support in storybook#5925

Merged
ckifer merged 1 commit into
recharts:3.xfrom
saurabhraj123:feature/add-width-auto-in-the-storybook
Jun 6, 2025
Merged

Add width 'auto' support in storybook#5925
ckifer merged 1 commit into
recharts:3.xfrom
saurabhraj123:feature/add-width-auto-in-the-storybook

Conversation

@saurabhraj123

Copy link
Copy Markdown
Contributor

Description

Adding width='auto' support in storybook. Refer to this: #5880

Implementation summary:
Changed control type to text for YAxis. Then inside YAxis.stories.tsx, wrote a function to convert entered text to number or 'auto' and passed it to YAxis.

Related Issue

#5880

How Has This Been Tested?

By entering different values in the input field for width.

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 extended an existing story to show my changes

@saurabhraj123

Copy link
Copy Markdown
Contributor Author

We'll have to update recharts.org API section as well, right?

@ckifer

ckifer commented Jun 6, 2025

Copy link
Copy Markdown
Member

Yeah, but not yet because this is only in 2.x

recharts.org is the 2.x docs still and isn't versioned

Comment thread storybook/stories/API/cartesian/YAxis.stories.tsx
@ckifer
ckifer merged commit 6a12d82 into recharts:3.x Jun 6, 2025
@codecov

codecov Bot commented Jun 6, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.64%. Comparing base (2055882) to head (29b70ad).
Report is 2 commits behind head on 3.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              3.x    #5925   +/-   ##
=======================================
  Coverage   95.64%   95.64%           
=======================================
  Files         188      188           
  Lines       19091    19091           
  Branches     3836     3836           
=======================================
  Hits        18260    18260           
  Misses        825      825           
  Partials        6        6           

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

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.

2 participants