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

Adding graph_attr doesn't take effect #202

Open
svscorp opened this issue Jun 15, 2020 · 3 comments
Open

Adding graph_attr doesn't take effect #202

svscorp opened this issue Jun 15, 2020 · 3 comments

Comments

@svscorp
Copy link

svscorp commented Jun 15, 2020

I've tried variety of the options, including "fixedsize": "shape", but the size of the shapes doesn't change.

    with Cluster("New Cluster", graph_attr={"fixedsize": "true", "width": "800"}):
        Server("app") - Server("app") - Server("app")
@svscorp
Copy link
Author

svscorp commented Jun 15, 2020

References #65

@clayms
Copy link

clayms commented Nov 4, 2020

If you only want to change the size, you don't need to set the graph_attr. See below.

See more attributes here: https://graphviz.gitlab.io/doc/info/attrs.html

with Diagram('\ndemo', show=False) as diag:
    with Cluster(""):
        Node(shape="triangle",
            label="tiny", fontsize="6", labelloc="c",
            fixedsize="true", width="0.5", height="0.8", 
            pin="true", pos="0,2")
        Node(shape="triangle", 
            label="normal", labelloc="c", 
            pin="true", pos="1,1")

diag

image

@TechDH
Copy link

TechDH commented Jul 31, 2022

This only seems to work on nodes. The problem I'm having is when there are say 100 nodes, the visual puts them all in a straight line. How do you get the visual to create rows of nodes within a cluster? Can you manage the width of the clusters or even at the Diagram level? I could not add width settings to these objects and get them to work.

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