yWorks / yfiles-jupyter-graphs

The home of the Jupyter notebook graph visualization widget powered by yFiles for HTML
https://www.yworks.com/products/yfiles-graphs-for-jupyter
Other
133 stars 14 forks source link

Consider adding convenience "overloads" to the binding properties #16

Closed yGuy closed 1 year ago

yGuy commented 1 year ago

Right now we have to write:

w.edge_label_mapping = lambda index,edge : edge.get('properties',{}).get('variable','no value')

It would be awesome if we could automatically accept functions that only accept one argument (only the item? only the index?) and if there was a way to simply specify the name of the property as a string to use for binding:

w.edge_label_mapping = 'variableName'
// would be effectively the same as
w.edge_label_mapping = lambda index,edge : edge.get('properties',{}).get('variableName','no value')