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

Possibility to set the width of the generated flowchart #129

Closed
knsv opened this issue Mar 7, 2015 · 5 comments
Closed

Possibility to set the width of the generated flowchart #129

knsv opened this issue Mar 7, 2015 · 5 comments
Labels
Skip changelog Don't include in the changelog Status: Approved Is ready to be worked on Type: Enhancement New feature or request

Comments

@knsv
Copy link
Collaborator

knsv commented Mar 7, 2015

By adding a flowchartConfiguration with the with it should b possible to set the with to 100% or a specific with like 970px

If the configuration is omitted the actual width should be used.

@knsv knsv added Type: Enhancement New feature or request Status: Approved Is ready to be worked on labels Mar 7, 2015
@knsv knsv changed the title Possibility to set the with of the generated flowchart Possibility to set the width of the generated flowchart Mar 7, 2015
@knsv
Copy link
Collaborator Author

knsv commented Jun 7, 2015

A fix for this has been released in version 0.5.0

@knsv knsv closed this as completed Jun 7, 2015
@mtrienis
Copy link

Has anyone verified this issue has been resolved? I'm struggling to get the flow diagram to resize based on width argument and I could certainly be doing something wrong. However, I simply modified

/test/web.html

    <script>
        var config = {
            mermaid:{
                startOnLoad:true,
                htmlLabels:true,
                callback:function(id){
                    console.log(id,' rendered');
                },
                flowChart:{width:'50%'}
            }
        };
        mermaid.initialize(config);
    </script>

And did not seem to notice any of the charts resize.

@pnewell
Copy link

pnewell commented Aug 27, 2015

I am having trouble with this as well. If I want to set the max width for the nodes, where and how do I do it exactly?

@knsv
Copy link
Collaborator Author

knsv commented Aug 27, 2015

Sorry for the late reply for this. Summer is great! :-)

@pnewell, this issue refers to the width of the whole chart and not the nodes.

@trienism, I see the issue. Currently it will decrease the width if it is to wide. But will ignore your setting. If you surround you mermaid div with another div with width:50% set in the css you should get the effect you desire.

Will fix this though for next release.

@majinliang123
Copy link

was is resolved

@klemmchr klemmchr added the Skip changelog Don't include in the changelog label Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip changelog Don't include in the changelog Status: Approved Is ready to be worked on Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants