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

fix: Add link with custom color in existing graph #170

Merged
merged 3 commits into from
Feb 3, 2019

Conversation

LonelyPrincess
Copy link
Collaborator

When a new link was added in real time by updating an existing graph instance, if it was configured to have a custom color with the link.color property, that value was ignored and the default color was applied instead. This issue was reported in #169.

The source of the problem was that, when generating a d3Link instance in the _mapDataLinkToD3Link method, the value of the color property was not kept.

Only the source and target values were being added to the d3Link which would actually be rendered in the graph, and the color property was completely lost by the time the graph was to be drawn on the screen. The issue could be solved by adding a color property to the generated d3Link object.

LonelyPrincess and others added 3 commits January 31, 2019 21:53
When a new link was added in real time by updating an existing graph
instance, if it was configured to have a custom color with the
'link.color' property, that value was ignored and the default color was
displayed instead. This issue was reported in #169.

The source of the problem was that, when generating a d3Link instance in
the '_mapDataLinkToD3Link' method, the value of the color property was
not kept. Only the source and target values were being added to the
d3Link which would actually be rendered in the graph, and the color
property was completely lost by the time the graph was to be drawn on
the screen.

The issue could be solved by adding a color property to the d3Link
object.
@danielcaldas
Copy link
Owner

Hey thanks for the fix @LonelyPrincess, just did a small adjustment so that we properly support the other link level properties as well, this was introduced in the PR #166

@danielcaldas danielcaldas merged commit ec853f9 into master Feb 3, 2019
@danielcaldas danielcaldas deleted the fix/wrong-link-color branch February 3, 2019 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants