-
Notifications
You must be signed in to change notification settings - Fork 425
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
[FEATURE] Please Add Arrow Head In Edge Configuration #22
Comments
Agreed. Will add an API for this. |
Not directly related to this thread but I will ask it anyway. Is there a way to pass a config object at the time of node/link creation to customize individual node/link appearance like color, position, size and whatnot? Thanks |
Yep. Check this: "Basic graph operations" - you can pass any object (not necessary a string or a number) as a last argument for |
Thanks for your response. My question was a bit different though. I am aware of the data attributes that associates an arbitrary object/data to each node and link. But if there are some graph configuration properties passed in that object, they wont be applied automatically. User has to apply config properties in a callback (correct me if I am wrong). Following example may explain my point. addNode(id, data, config) Now, if 'config' object is something like: config = {
color: '#f00',
position: {x: 10, y:50}
} Then it should be applied at the time of node initialization. Eventually we can document possible config properties for nodes and links. If my question seems valid and if this feature is not available yet in the library then we can move this discussion in a separate feature request. |
i agree with @ibnesayeed to have arrow heads in the API, since directional vs bidirectional link is a common use. |
@ibnesayeed you could pass arrow head at construction of placelink() function - if using SVG, you could use a tag instead of line and use markers to place arrows. |
Thanks @gg4u. The feature request is still worth, though I am done with the project I was using it for. |
I am aware of those examples showing arrow heads with some extra code. But it will be great to have a property in the edge configuration that allows us to add arrow heads on both the ends, one end or none (by default?).
The text was updated successfully, but these errors were encountered: