-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Description
When creating a Git graph using the Mermaid Live Editor, the visual theme and styling displayed within the editor are not preserved in the exported image. The exported image appears with a different, seemingly default, theme, resulting in a discrepancy between the intended visualization and the output.
For example, in the Mermaid Live editor, I used "config: theme: redux." This displays the Redux theme (without colors) in the Editor Live Output View. But When Exported, it Exports as Default Theme ( with colors).
FYI: I've attached the Split Screenshot of the Difference of the Image on the Live Editor vs the same Image After Exported as PNG.

Steps to reproduce
- Go to the Mermaid Live Editor (https://mermaid.live/).
- Input a Mermaid Git graph code with the theme Redux.
- Observe the graph rendered in the editor, noting its specific theme (e.g., monochrome, specific line styles, and node appearances as seen).
- Export the graph as an image (e.g., PNG).
- Open the exported image and see the Difference between the color and theme between Live Editor Image and Exported one.
Screenshots


Code Sample
---
config:
theme: redux
---
gitGraph
commit id: "Initial Commit" type: HIGHLIGHT
checkout main
branch bugfix
checkout bugfix
commit id: "Commit on bugfix" tag: "OD: 4 Sep 2020" tag: "CD: 16 Oct 2020"
checkout main
branch develop1
checkout develop1
commit id: "Commit on develop1"
checkout main
branch develop2
checkout develop2
commit id: "Commit on develop2" tag: "OD: 25 Jul 2018" tag: "CD: 4 Sep 2020"
commit id: "Frozen: develop2" tag: "freeze" type: REVERSE
checkout main
merge bugfix id: "Merge bugfix"
checkout develop1
merge main id:"merge from main"
checkout main
merge develop1 id: "Merge develop1"
commit id: "New Branches" type: HIGHLIGHT
checkout main
branch develop3
checkout develop3
commit id: "Commit on develop3" type: NORMAL
checkout main
branch bugfix1
checkout bugfix1
commit id: "Commit on bugfix1" tag: "OD: 4 Sep 2020, CD: EH/QD/CTO App + 1 day" type: NORMAL
checkout main
branch bugfix2
checkout bugfix2
commit id: "Commit on bugfix2" type: NORMAL
Setup
- Mermaid version: IDK, Recent Browser Version ( 23/07/2025) https://www.mermaidchart.com/app/dashboard
- Browser and Version: [Chrome : Version 137.0.7151.69 (Official Build) (64-bit) ]
Suggested Solutions
SVG Exporting is OK, But Again Converting it into JPG or PNG is Double Task for Me, So Please Check it Into it.
Also Make sure this works on the Mermaid CLI ( NPM : mermaid_Modules) too Please.
This would help me a lot in making gitgraph easier and Efficient.
Additional Context
Mermaid is Much Better and Easier. Thank You for Making this Possible.