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

Broken CLI Graphs? (v0.5.1) #196

Closed
jdiefen opened this issue Aug 13, 2015 · 6 comments
Closed

Broken CLI Graphs? (v0.5.1) #196

jdiefen opened this issue Aug 13, 2015 · 6 comments

Comments

@jdiefen
Copy link

jdiefen commented Aug 13, 2015

Something's happened since I last used the CLI. Has the website not been updated, or is everything breaking? Even something as simple as this:

graph LR
    C --> D

or

graph TD
    A-->B

Is giving me a completely blank PNG...not even a background. Just completely transparent with nothing shown.
Also, is this (from #153 ):

graph LR
    subgraph A
        B
    end
    style A fill:#f9f

supposed to give this .png?
t mermaid
Where is that extra A element coming from? I tried putting a semi-colon after the style line, but nothing changed.

Mermaid & PhantomJS are both updated to the newest version.

@knsv
Copy link
Collaborator

knsv commented Aug 14, 2015

I think this is a result of lacking styling. I could replicate your issue and eliminating it by adding
-t ./dist/mermaid.css
to the command-line

@jdiefen
Copy link
Author

jdiefen commented Aug 14, 2015

Is this the way it's supposed to work? Is there any way the css could just be included by default if no css file is given? I feel that this issue would happen to just about everyone who's starting out by reading the documentation online.

@gillesdemey
Copy link
Contributor

I definitely got caught up by this, and I imagine many others will. Is there a reason why we shouldn't just use the default styles when generating a PNG file? Or is this a recent regression?

It seems like the default behaviour, which is to generate blank PNG files, is confusing.

@knsv
Copy link
Collaborator

knsv commented Sep 15, 2015

I agree! @fardog is this something you could find time for? I am unsure how the paths to the css files would be calculated in the CLI when installed globally.

@gillesdemey
Copy link
Contributor

I've sent a PR to address the issue, tested it locally by using npm link to replace the globally installed version. I've also included a test of course :)

@fardog
Copy link
Contributor

fardog commented Sep 15, 2015

I'll review the posted PR after work and give it a +1 if it looks good

@knsv knsv closed this as completed in #205 Sep 16, 2015
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

4 participants