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

Created options nodeStrokeColor and processNode; Updated FontAwesome #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jlcd
Copy link

@jlcd jlcd commented May 15, 2019

Just created nodeStrokeColor and processNode options.

  • nodeStrokeColor will set the "border" color for all nodes;
  • processNode will process each individual node, allowing changing property values and many customizations.
    Among the customizations I added icon, strokeColor and color options to each node, so we can have each one with a different icon, "border" color and fill color, respectively.

Example, to customize a node based on a property, you can do the following:

var neo4jd3 = new Neo4jd3('#neo4jd3', {
(...)
processNode: function (node) {
                if (node.labels.includes('Company') && node.properties.is_warehouse) {
                    node.color = '#0F52BA';
                    node.icon = 'warehouse';
                    node.strokeColor = 'red';
                    node.labels = ["Warehouse"];
                }
}
(...)
}

I'm not 100% familiar with what I should do to have everything tested and ready to deploy (eg. minimize the source etc), so feel free to give me a hand on that.

@ajmeese7
Copy link

FYSA the file you modified is automatically created from the neo4jd3.js file, so if you make any changes in a real file it will automatically overwrite everything you've written. In the future be sure to edit the scripts directly instead of the docs or dist directories :)

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.

None yet

2 participants