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

Unable to Add Text to the Edge Label #48

Open
jodar25 opened this issue Dec 11, 2024 · 0 comments
Open

Unable to Add Text to the Edge Label #48

jodar25 opened this issue Dec 11, 2024 · 0 comments

Comments

@jodar25
Copy link

jodar25 commented Dec 11, 2024

Hi,

I am not able to add text to edge labels following the documentation:

Main categories

blade_grinders = NodeObject(tree=tree, value="Blade Grinders", tree_parent=grinders)
burr_grinders = NodeObject(tree=tree, value="Burr Grinders", tree_parent=grinders)
blunt_objects = NodeObject(tree=tree, value="Blunt Objects", tree_parent=grinders)

Other

elec_blade = NodeObject(
tree=tree, value="Electric Blade Grinder", tree_parent=blade_grinders
)
mnp = NodeObject(tree=tree, value="Mortar and Pestle", tree_parent=blunt_objects)

Conical Burrs

conical = NodeObject(tree=tree, value="Conical Burrs", tree_parent=burr_grinders)
elec_conical = NodeObject(tree=tree, value="Electric", tree_parent=conical)
manual_conical = NodeObject(tree=tree, value="Manual", tree_parent=conical)

HarioSkerton = NodeObject(tree=tree, value="Hario Skerton", tree_parent=manual_conical)
Comandante = NodeObject(tree=tree, value="Comandante", tree_parent=manual_conical)
JZpresso = NodeObject(tree=tree, value="ZJpresso JX-Pro", tree_parent=manual_conical)
weberHG2 = NodeObject(tree=tree, value="Weber HG-2", tree_parent=manual_conical)

BaratzaEnc = NodeObject(tree=tree, value="Baratza Encore", tree_parent=elec_conical)
Niche = NodeObject(tree=tree, value="Niche Zero", tree_parent=elec_conical)
WeberKey = NodeObject(tree=tree, value="Weber Key", tree_parent=elec_conical)

Flat Burrs

flat = NodeObject(tree=tree, value="Flat Burrs", tree_parent=burr_grinders)

DF64 = NodeObject(tree=tree, value="Turin DF64", tree_parent=flat)
FellowOde = NodeObject(tree=tree, value="Fellow Ode", tree_parent=flat)
LagomP64 = NodeObject(tree=tree, value="Lagom P64", tree_parent=flat)

edge1 = drawpyo.diagram.Edge(source=burr_grinders, target=flat, value="aaaa")
edge1.label = "-----aaaaa------"
edge1.label_position = -1

edge2 = Edge(source=conical, target=flat)
edge2.value = "-----bbbbb------"
edge2.label_position = 1

flat.add_in_edge(edge=edge1)
burr_grinders.add_out_edge(edge=edge2)

grp = tree.auto_layout()
tree.write()

image

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

1 participant