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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize color for a link #79

Merged
merged 2 commits into from
Jun 25, 2018
Merged

Customize color for a link #79

merged 2 commits into from
Jun 25, 2018

Commits on Jun 23, 2018

  1. 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.
    LonelyPrincess committed Jun 23, 2018
    Configuration menu
    Copy the full SHA
    35431f7 View commit details
    Browse the repository at this point in the history
  2. 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.
    LonelyPrincess committed Jun 23, 2018
    Configuration menu
    Copy the full SHA
    ecb102c View commit details
    Browse the repository at this point in the history