targetNode="gephiDiv"><a>Importing from Gephi</a></li>
targetNode="importDiv"><a>Import</a></li>
</ul>
<br>
@ -1156,7 +1153,7 @@ var options = {
</table>
</div>
<divid="eventsDiv"class="hidden">
<divid="eventsDiv"class="hidden">
<h3>All Events</h3>
<p>This is a list of all the events in the public API. They are collected here from all individual modules.</p>
@ -1174,8 +1171,11 @@ var options = {
<tr>
<td>click</td>
<td>
<preclass="code">
{
Object
</td>
<td>Fired when the user clicks the mouse or taps on a touchscreen device. Passes an object with properties structured as:
<preclass="prettyprint lang-js">{
nodes: [Array of selected nodeIds],
edges: [Array of selected edgeIds],
event: [Object] original click event,
@ -1186,7 +1186,6 @@ var options = {
}
</pre>
</td>
<td>Fired when the user clicks the mouse or taps on a touchscreen device.</td>
</tr>
<tr>
<td>doubleClick</td>
@ -1242,8 +1241,10 @@ var options = {
</tr>
<tr>
<td>deselectNode</td>
<td><preclass="code">
{
<td>Object
</td>
<td>Fired when a node (or nodes) has (or have) been deselected by the user. The previous selection is the list of nodes and edges that were selected before the last user event. Passes an object with properties structured as:
<preclass="prettyprint lang-js">{
nodes: [Array of selected nodeIds],
edges: [Array of selected edgeIds],
event: [Object] original click event,
@ -1259,10 +1260,6 @@ var options = {
}
</pre>
</td>
<td>Fired when a node (or nodes) has (or have) been deselected by the user. The previous selection is
the
list of nodes and edges that were selected before the last user event.
</td>
</tr>
<tr>
<td>deselectEdge</td>
@ -1324,46 +1321,38 @@ var options = {
</td>
<tr>
<td>stabilizationProgress</td>
<td>
<preclass="code">
{
<td>Object</td>
<td>Fired when a multiple of the <code>updateInterval</code> number of iterations is reached. This only occurs in the 'hidden' stabilization. Passes an object with properties structured as:
<preclass="prettyprint lang-js">{
iterations: Number // iterations so far,
total: Number // total iterations in options
}
</pre>
</td>
<td>Fired when a multiple of the <code>updateInterval</code> number of iterations is reached. This only
occurs in the 'hidden' stabilization.
}</pre>
</td>
</tr>
<tr>
<td>stabilizationIterationsDone</td>
<td>none</td>
<td>Fired when the 'hidden' stabilization finishes. This does not necessarily mean the network is
stabilized; it could also mean that the amount of iterations defined in the options has been
reached.
<td>Fired when the 'hidden' stabilization finishes. This does not necessarily mean the network is stabilized; it could also mean that the amount of iterations defined in the options has been reached.
</td>
<tr>
<td>stabilized</td>
<td>
<preclass="code">
{
<td>Object</td>
<td>Fired when the network has stabilized or when the <code>stopSimulation()</code> has been called. The amount of iterations it took could be used to tweak the maximum amount of iterations needed to stabilize the network. Passes an object with properties structured as:
<preclass="prettyprint lang-js">{
iterations: Number // iterations it took
}
</pre>
</td>
<td>Fired when the network has stabilized or when the <code>stopSimulation()</code> has been called. The
amount of iterations it took could be used to tweak the maximum amount of iterations needed to
stabilize
the network.
}</pre>
</td>
<trclass="subHeader">
<tdcolspan="3">Event triggered by the canvas.</td>
</tr>
<tr>
<td>resize</td>
<td>
<preclass="code">
<td>Object</td>
<td>Fired when the size of the canvas has been resized, either by a redraw call when the container div has changed in size, a setSize() call with new values or a setOptions() with new width and/or height values. Passes an object with properties structured as:
<preclass="prettyprint lang-js">
{
width: Number // the new width of the canvas
height: Number // the new height of the canvas
@ -1371,13 +1360,6 @@ var options = {
oldHeight: Number // the old height of the canvas
}
</pre>
<ul>
</ul>
</td>
<td>Fired when the size of the canvas has been resized, either by a redraw call when the container div
has
changed in size, a setSize() call with new values or a setOptions() with new width and/or height
var parsedData = vis.network.convertDot(DOTstring);
var data = {
nodes: parsedData.nodes,
edges: parsedData.edges
}
<divid="importDiv"class=" hidden">
var options = parsedData.options;
<p>Network contains conversion utilities to import data from <ahref="#importGephi">Gephi</a> and graphs in the <ahref="#importDot">DOT language</a>.</p>
// you can extend the options like a normal JSON variable:
options.nodes = {
color: 'red'
}
<h3id="importGephi">Import data from Gephi</h3>
// create a network
var network = new vis.Network(container, data, options);
</pre>
</div>
<divid="gephiDiv"class=" hidden">
<p>
Network can import data straight from an exported json file from gephi. You can get the JSON exporter here: