org.visallo.graph.style

Apply additional cytoscape styles

Add to the cytoscape stylesheet. Cytoscape docs

This is used to adjust the styling of all graph elements: Nodes, Edges, Decorations, etc.

The default stylesheet is defined in styles.js

Example

registry.registerExtension('org.visallo.graph.style', function(cytoscapeStylesheet) {
    // Changes selected nodes color to red
    cytoscapeStylesheet.selector('node:selected')
        .style({
            color: '#FF0000'
        })
});

Registration

registry.registerExtension("org.visallo.graph.style", config)

Source:
Tutorials:
See:
Configuration Properties:
Name Type Description
config StyleFn

Cytoscape style function

Validation Function

Extensions registered must pass this validation check to be used.

function extensionValidator(e) {
    return _.isFunction(e);
}

Type Definitions

StyleFn(cytoscapeStyle)

Source:
Parameters:
Name Type Description
cytoscapeStyle object
Properties
Name Type Description
selector function

Switch to adjusting the passed in selector string

style function

Add styles to the current selector. Accepts one parameter, the object of styles to add

css function

Alias of style