Skip to content

Feature: XY Chart - Enable rotate label on X axis#7774

Open
ngdaniels wants to merge 4 commits into
mermaid-js:developfrom
ngdaniels:feature/5926_xychart-rotate-X-label
Open

Feature: XY Chart - Enable rotate label on X axis#7774
ngdaniels wants to merge 4 commits into
mermaid-js:developfrom
ngdaniels:feature/5926_xychart-rotate-X-label

Conversation

@ngdaniels
Copy link
Copy Markdown

@ngdaniels ngdaniels commented May 22, 2026

📑 Summary

Brief description about the content of your PR.

Resolves #5926

📏 Design Decisions

Add new config param to enable user input rotation value in degree.
Label on X-axis will be rotated and chart size will adjust automatically.

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added necessary unit/e2e tests.
  • 📓 have added documentation. Make sure MERMAID_RELEASE_VERSION is used for all new features.
  • 🦋 If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 22, 2026

🦋 Changeset detected

Latest commit: e5c75e6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mermaid Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit e5c75e6
🔍 Latest deploy log https://app.netlify.com/projects/mermaid-js/deploys/6a117c5e3381510008b2838b
😎 Deploy Preview https://deploy-preview-7774--mermaid-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the Type: Enhancement New feature or request label May 22, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 22, 2026

Open in StackBlitz

@mermaid-js/examples

npm i https://pkg.pr.new/@mermaid-js/examples@7774

mermaid

npm i https://pkg.pr.new/mermaid@7774

@mermaid-js/layout-elk

npm i https://pkg.pr.new/@mermaid-js/layout-elk@7774

@mermaid-js/layout-tidy-tree

npm i https://pkg.pr.new/@mermaid-js/layout-tidy-tree@7774

@mermaid-js/mermaid-zenuml

npm i https://pkg.pr.new/@mermaid-js/mermaid-zenuml@7774

@mermaid-js/parser

npm i https://pkg.pr.new/@mermaid-js/parser@7774

@mermaid-js/tiny

npm i https://pkg.pr.new/@mermaid-js/tiny@7774

commit: e5c75e6

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 0% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 3.26%. Comparing base (91b9f01) to head (e5c75e6).

Files with missing lines Patch % Lines
...s/xychart/chartBuilder/components/axis/baseAxis.ts 0.00% 22 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #7774      +/-   ##
==========================================
- Coverage     3.26%   3.26%   -0.01%     
==========================================
  Files          599     600       +1     
  Lines        60839   60868      +29     
  Branches       917     917              
==========================================
  Hits          1986    1986              
- Misses       58853   58882      +29     
Flag Coverage Δ
unit 3.26% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/mermaid/src/config.type.ts 100.00% <ø> (ø)
...id/src/diagrams/xychart/chartBuilder/interfaces.ts 10.00% <ø> (ø)
...s/xychart/chartBuilder/components/axis/baseAxis.ts 0.25% <0.00%> (-0.02%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented May 22, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 3 added May 23, 2026, 10:19 AM

@ngdaniels ngdaniels marked this pull request as ready for review May 23, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xychart X-axis labels overlapping each other to be unreadable - need feature to rotate them by 45 degrees (GNUplot can do this)

1 participant