Skip to content
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

Cannot Generate gitGraph Images #81

Closed
P-N-L opened this issue May 3, 2022 · 4 comments
Closed

Cannot Generate gitGraph Images #81

P-N-L opened this issue May 3, 2022 · 4 comments

Comments

@P-N-L
Copy link

P-N-L commented May 3, 2022

Hello,

I have set up Pandoc with mermaid-filter 1.4.6 from NPM. It works great with flowcharts, but generates a blank image when I try to use a gitGraph. When I run it, I simply get empty/white images generated. I understand that gitGraph is currently experimental, I just wanted to see whether I should expect it to work, and if not, whether anybody knows if that is an upcoming effort for mermaid-filter or the mermaid project itself.

Thanks!

@P-N-L
Copy link
Author

P-N-L commented May 3, 2022

I'm sorry, I stand corrected! Looks like I was using a bad example.

Good example (from gitGraph documentation):

gitGraph:
options
{
    "nodeSpacing": 150,
    "nodeRadius": 10
}
end
commit
branch newbranch
checkout newbranch
commit
commit
checkout master
commit
commit
merge newbranch

Bad example (honestly can't remember where I found it, sorry):

gitGraph
    commit
    commit
    branch develop
    checkout develop
    commit
    commit
    checkout main
    merge develop
    commit
    commit

I am seeing an issue where the graph gets cut off where I am using it on a webpage, but that may be something I just have to fiddle with.

@P-N-L
Copy link
Author

P-N-L commented May 3, 2022

When I generate with png, it looks OK (though perhaps a bit too wide):

tmp-9788YAFQsdQ6jgCV tmp

When I generate with svg, it gets cut off:
tmp-9265xE0KOmFq0at7 tmp

@lunarcloud
Copy link

lunarcloud commented Dec 6, 2023

I'm using mermaid-filter 1.4.6 and this chart exports as a blank white graph (regardless of options like theme) in my pandoc HTML output.

     ```{.mermaid theme=forest}
      gitGraph:
        commit
        commit
    
        branch feature/x
        checkout feature/x
        commit
        commit
        
        checkout main
    
        merge feature/x
        
        branch feature/y
        checkout feature/y
        commit
        commit
        
        checkout main
    
        merge feature/y
        
        branch release/x
        checkout release/x
    
        commit tag: "X.X.X-qualifier.X"
        
        checkout main
        branch feature/z
        checkout feature/z
        commit
        commit
        
        checkout main
    
        merge feature/z
            
    ```
  gitGraph:
    commit
    commit

    branch feature/x
    checkout feature/x
    commit
    commit
    
    checkout main

    merge feature/x
    
    branch feature/y
    checkout feature/y
    commit
    commit
    
    checkout main

    merge feature/y
    
    branch release/x
    checkout release/x

    commit tag: "X.X.X-qualifier.X"
    
    checkout main
    branch feature/z
    checkout feature/z
    commit
    commit
    
    checkout main

    merge feature/z
        
Loading

raghur added a commit that referenced this issue Dec 23, 2023
@raghur
Copy link
Owner

raghur commented Dec 23, 2023

Can you try out v1.4.7 from npm? I added the example to the e2e test file in the repo. Please reopen if you run into issues

@raghur raghur closed this as completed Dec 23, 2023
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

No branches or pull requests

3 participants