-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Customizable color for individual links When adding links to a dataset now, we can add optionally include a 'color' property. If it's set, said color will override the default color defined in the configuration object. In order for this to work, the 'buildLinkProps' is now receiving a 'link' object, which could contain any additional data aside from the source and target nodes. In this case, we'll be only considering a 'color' property that will be taken into account when setting the stroke color of the line to draw. The former 'source' and 'target' parameters that used to be stand-alone parameters in the function, are now data contained inside of the new 'link' object. * Add tests for custom link feature Added some new tests in the 'graph.helper.test' suite to check whether the customization of the color for a certain link is working correctly. We will be checking whether the stroke color matches the expected one in both scenarios: when a custom color is set and when no color has been passed along the link data.
- Loading branch information
1 parent
f4405a6
commit a515806
Showing
3 changed files
with
55 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters