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

LonelyPrincess commented Jan 31, 2019

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 Jan 31, 2019
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

This comment has been minimized.

Copy link
Owner

danielcaldas commented Feb 3, 2019

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
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@danielcaldas danielcaldas deleted the fix/wrong-link-color branch Feb 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.