Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upLinks labeling #47
Comments
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
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? |
This comment has been minimized.
This comment has been minimized.
@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 comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
Need this |
This comment has been minimized.
This comment has been minimized.
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?