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

[FEATURE] Please Add Arrow Head In Edge Configuration #22

Open
ibnesayeed opened this issue Feb 25, 2013 · 7 comments
Open

[FEATURE] Please Add Arrow Head In Edge Configuration #22

ibnesayeed opened this issue Feb 25, 2013 · 7 comments

Comments

@ibnesayeed
Copy link

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?).

@anvaka
Copy link
Owner

anvaka commented Mar 2, 2013

Agreed. Will add an API for this.

@ibnesayeed
Copy link
Author

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

@anvaka
Copy link
Owner

anvaka commented Mar 5, 2013

Yep. Check this: "Basic graph operations" - you can pass any object (not necessary a string or a number) as a last argument for addNode()/addLink() methods.

@ibnesayeed
Copy link
Author

ibnesayeed commented Mar 5, 2013

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.

@arikan
Copy link

arikan commented Apr 12, 2013

i agree with @ibnesayeed to have arrow heads in the API, since directional vs bidirectional link is a common use.

@gg4u
Copy link

gg4u commented Apr 29, 2017

@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.

@ibnesayeed
Copy link
Author

Thanks @gg4u. The feature request is still worth, though I am done with the project I was using it for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants