Graph Edge Class

Function that can change Cytoscape classes of edges. Useful for customizing the style of edges on the graph.


Web Plugin

Register a plugin file to register the extensions.

app.registerJavaScript("/org/visallo/examples/graph_edge_class/plugin.js", true);

Register Extension

Register the class extension that checks if any of the edges (they are by default bundled together by type) has a comment. If any of them do, add a class.

visallo.registry.registerExtension('org.visallo.graph.edge.class', function(edges, type, classes) {
    var hasComment = _.any(edges, function(edge) {
        return _.findWhere(, { name: '' })

    if (hasComment) {

Register a style extension to test.

visallo.registry.registerExtension('', function(cytoscapeStylesheet) {
             color: '#ff0000',
             'line-color': '#ff0000',
             'target-arrow-color': '#ff0000',
             width: 5

results matching ""

    No results matching ""