-
Notifications
You must be signed in to change notification settings - Fork 233
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
Links labeling #47
Comments
Hello @dmh126! These are two different feature requests, I'll tell you what you need to know about it: 1 - Adding a label - Regarding this one, it may be difficult to implement this at this moment, still it would be a nice capability to add on rd3g. You could have something like what you suggested and in the 2 - This is especially achievable, a small change to the API similar to what you mentioned for the label would be required though, the steps would be: 2.1 Change the API adding links: [
{source: x, target: y, color: "xxx"}
] 2.2 In const color = link.color || config.link.color;
let stroke = color;
if (highlight) {
...
} TL;DR - 2 is achievable in short-term and 1 is not. |
I'm struggling to find integration points for this library, imho this would ideally work something like this: given links: links: [
{source: x, target: y, color: "xxx"}
] expose a <Graph
data={data}
renderLink={(link) => {
const { x, y, transform, color } = link; // where x, y and transform are injected by r3dg
return <g><line {...link} /><text offset={x} transform={transform} color={color} /></g> // pseudo code
}}
/> Thoughts? |
@StevenLangbroek I see what you mean there, still, the whole concept of 1. Allow clients to unitarily define links and nodes [Out of scope in this Issue] 2. Pass Hope this clears it out a bit. Cheers! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Need this |
Closing with #178. Will go on next release. |
Hello!
Is there any possibility to add labels to links? I'd like to have structure like that:
And I want to create something like I have in my neo4j browser:
If not label, at least I'd like to have different colors, like we can do with nodes, simply by adding "color: value" to the node object.
If there are no plans for features like that, maybe some tips how I can implement them?
The text was updated successfully, but these errors were encountered: