-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sankey diagrams are missing viewBox SVG attribute #5100
Labels
Comments
alex-titarenko
added
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
labels
Dec 4, 2023
sidharthv96
added a commit
that referenced
this issue
Dec 4, 2023
This was referenced Dec 4, 2023
sidharthv96
added
Internals: Renderer
Graph: Sankey
and removed
Status: Triage
Needs to be verified, categorized, etc
labels
Dec 4, 2023
github-merge-queue bot
pushed a commit
that referenced
this issue
Dec 5, 2023
fix: #5100 Add viewbox to sankey
sidharthv96
added a commit
that referenced
this issue
Dec 6, 2023
* develop: (70 commits) build(deps-dev): bump vite from 4.4.9 to 4.4.12 Changes to .prettierignore 1. Added 'demos/dev/**' to be ignored by Prettier. 2. Added '!/demos/dev/example.html' so that Prettier ensures no one changes the example.html in a way that doesn't obey the Prettier code formatting rules. build: use `tsx` instead of `ts-node-esm` chore: Downgrade node to 18.18.2 fix: #5100 Add viewbox to sankey chore(deps): update all minor dependencies chore: Rename test test: Add unit test for generic classname and namespace fix: Check if parentCommit is provided Split type from generic class name Condition of Parent Id Without Merge Commit Added Referenced the PmWiki's Cookbook recipe enabling MermaidJs schematics in wiki pages test(e2e): fix pie chart E2E tests for PR #4288 Add dummy commit to trigger GH checks chore: Revert unnecessary export refactor: Remove unnecessary calculations chore: Fix computeWidth function chore: Cleanup setupGraphViewbox Update docs update mermaidAPI to cleanup the text before passing to getDiagramFromText ...
sidharthv96
added a commit
to NicolasNewman/mermaid
that referenced
this issue
Dec 6, 2023
* develop: (192 commits) build(deps-dev): bump vite from 4.4.9 to 4.4.12 Changes to .prettierignore 1. Added 'demos/dev/**' to be ignored by Prettier. 2. Added '!/demos/dev/example.html' so that Prettier ensures no one changes the example.html in a way that doesn't obey the Prettier code formatting rules. build: use `tsx` instead of `ts-node-esm` chore: Downgrade node to 18.18.2 fix: mermaid-js#5100 Add viewbox to sankey chore(deps): update all minor dependencies chore: Rename test test: Add unit test for generic classname and namespace fix: Check if parentCommit is provided Split type from generic class name Condition of Parent Id Without Merge Commit Added Referenced the PmWiki's Cookbook recipe enabling MermaidJs schematics in wiki pages test(e2e): fix pie chart E2E tests for PR mermaid-js#4288 Add dummy commit to trigger GH checks chore: Revert unnecessary export refactor: Remove unnecessary calculations chore: Fix computeWidth function chore: Cleanup setupGraphViewbox Update docs update mermaidAPI to cleanup the text before passing to getDiagramFromText ...
sidharthv96
added a commit
that referenced
this issue
Dec 7, 2023
* next: (387 commits) build(deps-dev): bump vite from 4.4.9 to 4.4.12 Changes to .prettierignore 1. Added 'demos/dev/**' to be ignored by Prettier. 2. Added '!/demos/dev/example.html' so that Prettier ensures no one changes the example.html in a way that doesn't obey the Prettier code formatting rules. build: use `tsx` instead of `ts-node-esm` chore: Downgrade node to 18.18.2 fix: #5100 Add viewbox to sankey chore(deps): update all minor dependencies chore: Rename test test: Add unit test for generic classname and namespace fix: Check if parentCommit is provided Split type from generic class name Condition of Parent Id Without Merge Commit Added Referenced the PmWiki's Cookbook recipe enabling MermaidJs schematics in wiki pages test(e2e): fix pie chart E2E tests for PR #4288 Add dummy commit to trigger GH checks chore: Revert unnecessary export refactor: Remove unnecessary calculations chore: Fix computeWidth function chore: Cleanup setupGraphViewbox Update docs update mermaidAPI to cleanup the text before passing to getDiagramFromText ...
sidharthv96
added a commit
that referenced
this issue
Dec 7, 2023
* develop: Update docs Update NiceGuy.io links in integrations-community.md build(deps-dev): bump vite from 4.4.9 to 4.4.12 Changes to .prettierignore 1. Added 'demos/dev/**' to be ignored by Prettier. 2. Added '!/demos/dev/example.html' so that Prettier ensures no one changes the example.html in a way that doesn't obey the Prettier code formatting rules. build: use `tsx` instead of `ts-node-esm` fix: #5100 Add viewbox to sankey fix: Check if parentCommit is provided Condition of Parent Id Without Merge Commit Added Error Hash Removed Linting Issue Fixed Updated gitgraph.md Linting Issue Fixed Documentation Modified New Ex Added e2e test case added Merge Conflict Resolved Suggested Changes FOR PR DONE documentation added, Tests Fixed All Unit Tests Passing Unit Test Cases Added Parser and Logic For Parent Commit Added
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Description
Looks like Sankey diagrams the only one with missing
viewBox
SVG attribute. Without this attribute you can't properly scale diagram down to fit the width of the page.Steps to reproduce
see the result from screenshot.
Please note that to reproduce this you can't use Mermaid Live Editor since it uses
svg-pan-zoom
library which applies transformation to the image, and most people don't do this.All other diagrams are working fine except Sankey.
Screenshots
Without
viewBox
attributeWhen I try to add
viewBox
attribute manually via Chrome DevTools I can see the correct resultCode Sample
No response
Setup
Suggested Solutions
Add viewBox attribute to SVG element of Sankey diagrams
Additional Context
No response
The text was updated successfully, but these errors were encountered: