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

Space between Node and It's label #196

Open
sree-cgit opened this issue Jun 9, 2020 · 5 comments
Open

Space between Node and It's label #196

sree-cgit opened this issue Jun 9, 2020 · 5 comments
Labels
question Further information is requested status/need-to-review Need to review

Comments

@sree-cgit
Copy link

Hi, I am trying to figure out a way to increase the space between node and it's label. I am importing custom image icon with Custom class and that made the label hide under the icon. I tried height but that didn't work. I converted the image to 256 pixes but still has the same issue

So, Is there any way to increase the space between node and label
Screenshot 2020-06-09 at 4 28 15 PM

@mingrammer
Copy link
Owner

Could you please show me your codes? I'll test it on my machine.

@mingrammer mingrammer added question Further information is requested status/need-to-review Need to review labels Jun 9, 2020
@sree-cgit
Copy link
Author

@clayms
Copy link

clayms commented Nov 5, 2020

Try adding a \n to the beginning of your label to put a new line character before your label.

@clayms
Copy link

clayms commented Nov 5, 2020

@sree-cgit
None of us have access to /Users/csreekanth/Desktop. Please add the images to you gist.

@clayms
Copy link

clayms commented Nov 5, 2020

@sree-cgit

Does this help?

from diagrams import Diagram, Cluster
from diagrams.custom import Custom
from diagrams.onprem.database import Druid
from diagrams.onprem.analytics import Hive
from diagrams.gcp.analytics import Bigquery
from diagrams.saas.social import Facebook

graph_attr = {
    "fontsize": "60",
    "compund": "True",
    "splines":"spline",
}
cluster_attr = {
    "fontsize": "40",
}
node_attr = {
    "fontsize": "25",
    "height": "10.6",
}
edge_attr = {
    "minlen": "4.0",
    "penwidth":"3.0",
    "concentrate": "true"
}

with Diagram("Custom Architecture", show=False, 
        graph_attr=graph_attr, edge_attr=edge_attr, node_attr=node_attr) as diag:

    with Cluster("Source", graph_attr=cluster_attr):
        facebook = Facebook("\nExternal")
        aol = Custom("\nAol\nLegacy", "aol.png")

    with Cluster("Storage", graph_attr=cluster_attr):
        druid = Druid("\nDruid")
        hive = Hive("\nHive")
        big_query = Bigquery("\n\nBig\nQuery")

    with Cluster("Visualize", graph_attr=cluster_attr):
        hue = Custom("Hue", "hue.png")
        looker = Custom("MAW\nExplorer", "looker.png")
        marvel = Custom("\nMarvel", "marvel.png")

    [facebook, aol] >> hive >> big_query >> [looker, marvel, hue]
    hive >> druid >> [looker, marvel, hue]

diag

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested status/need-to-review Need to review
Projects
None yet
Development

No branches or pull requests

3 participants