UNPKG

visjs-network

Version:

A dynamic, browser-based network visualization library.

34 lines (33 loc) 1.18 kB
<!doctype html> <html> <head> <title>Network | Clustering</title> <script type='text/javascript' src='../../../dist/vis.js'></script> <link href='../../../dist/vis-network.min.css' rel='stylesheet' type='text/css' /> <style type='text/css'> #mynetwork { width: 600px; height: 600px; border: 1px solid lightgray; } p { max-width:600px; } h4 { margin-bottom:3px; } </style> </head> <body> <p> Click any of the buttons below to cluster the network. On every push the network will be reinitialized first. You can click on a cluster to open it. </p> <input type='button' onclick='clusterByCid()' value='Cluster all nodes with CID = 1'> <br /> <input type='button' onclick='clusterByColor()' value='Cluster by color'> <br /> <input type='button' onclick='clusterByConnection()' value='Cluster 'node 1' by connections'> <br /> <input type='button' onclick='clusterOutliers()' value='Cluster outliers'> <br /> <input type='button' onclick='clusterByHubsize()' value='Cluster by hubsize'> <br /> <div id='mynetwork'></div> <script src='./index.js' type='text/javascript'></script> </body> </html>