Search code examples
javascriptgraph-visualizationsigma.js

Show edges only on hover


I exported to a Sigma.js template from Gephi. I want the edges to be shown only when you hover over the node. I added this in network/config.json but it is not helping:

  "drawingProperties": {
  **"drawEdges": false,**
  "defaultEdgeType": "curve",
  "defaultHoverLabelBGColor": "#002147",
  "defaultLabelBGColor": "#ddd",
  "activeFontStyle": "bold",
  "defaultLabelColor": "#000",
  "labelThreshold": 10,
  "defaultLabelHoverColor": "#fff",
  "fontStyle": "bold",
  "hoverFontStyle": "bold",
  "defaultLabelSize": 14
}

network/js/main.js :

var a = sigma.init(document.getElementById("sigma-canvas")).drawingProperties(drawProps).graphProperties(graphProps).mouseProperties(mouseProps);

PS: I don't know javascript


Solution

  • I was able to do it

    configProps={
    drawEdges: false
    };
    
    var a = sigma.init(document.getElementById("sigma-canvas")).drawingProperties(drawProps).graphProperties(graphProps).mouseProperties(mouseProps).configProperties(configProps);
    

    PS: I know nothing about js