@ -152,6 +154,106 @@ var data = new vis.DataView(dataset, options)
</li>
</ul>
<h2id="Methods">Methods</h2>
<p>DataView contains the following methods.</p>
<table>
<colgroup>
<colwidth="200">
</colgroup>
<tr>
<th>Method</th>
<th>Return Type</th>
<th>Description</th>
</tr>
<tr>
<td>
get([options] [, data])<br>
get(id [,options] [, data])<br>
get(ids [, options] [, data])
</td>
<td>Object | Array | DataTable</td>
<td>
Get a single item, multiple items, or all items from the DataView.
Usage examples can be found in section <ahref="#Getting_Data">Getting Data</a>, and the available <code>options</code> are described in section <ahref="#Data_Selection">Data Selection</a>. If parameter <code>data</code> is provided, items will be appended to this array or table, which is required in case of Google DataTable.
</td>
</tr>
<tr>
<td>
getDataSet()
</td>
<td>DataSet</td>
<td>
Get the DataSet to which the DataView is connected.
</td>
</tr>
<tr>
<td>
getIds([options])
</td>
<td>Number[]</td>
<td>
Get ids of all items or of a filtered set of items.
Available <code>options</code> are described in section <ahref="dataset.html#Data_Selection">Data Selection</a>, except that options <code>fields</code> and <code>type</code> are not applicable in case of <code>getIds</code>.
</td>
</tr>
<tr>
<td>off(event, callback)</td>
<td>none</td>
<td>
Unsubscribe from an event, remove an event listener. See section <ahref="#Subscriptions">Subscriptions</a>.
</td>
</tr>
<tr>
<td>on(event, callback)</td>
<td>none</td>
<td>
Subscribe to an event, add an event listener. See section <ahref="#Subscriptions">Subscriptions</a>.
</td>
</tr>
<tr>
<td>
setDataSet(data)
</td>
<td>none</td>
<td>
Replace the DataSet of the DataView. Parameter <code>data</code> can be a DataSet or a DataView.
</td>
</tr>
</table>
<h2id="Properties">Properties</h2>
<p>DataView contains the following properties.</p>
<table>
<colgroup>
<colwidth="200">
</colgroup>
<tr>
<th>Property</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>length</td>
<td>Number</td>
<td>The number of items in the DataView.</td>
</tr>
</table>
<h2id="Getting_Data">Getting Data</h2>
<p>
@ -165,8 +267,8 @@ var items = view.get();
<p>
Data of a DataView can be filtered and formatted again, in exactly the
same way as in a DataSet. See sections
<ahref="dataset.html#Data_Filtering">Data Filtering</a> and
<ahref="dataset.html#Data_Formatting">Data Formatting</a> for more
<ahref="dataset.html#Data_Manipulation">Data Manipulation</a> and
<ahref="dataset.html#Data_Selection">Data Selection</a> for more
@ -737,6 +737,22 @@ The options colored in green can also be used as options for the groups. All opt
If not provided, the earliest date present in the events is taken as start date.</td>
</tr>
<tr>
<td>timeAxis.scale</td>
<td>string</td>
<td>none</td>
<td>Set a fixed scale for the time axis of the Timeline. Choose from <code>'millisecond'</code>, <code>'second'</code>, <code>'minute'</code>, <code>'hour'</code>, <code>'weekday'</code>, <code>'day'</code>, <code>'month'</code>, <code>'year'</code>.</td>
</tr>
<tr>
<td>timeAxis.step</td>
<td>number</td>
<td>1</td>
<td>
Set a fixed step size for the time axis. Only applicable when used together with <code>timeAxis.scale</code>.
@ -303,7 +303,8 @@ When using a DataSet, the network is automatically updating to changes in the Da
<td>level</td>
<td>number</td>
<td>no</td>
<td>This level is used in the hierarchical layout. If this is not selected, the level does not do anything.</td>
<td>This level is used in the hierarchical layout. If this is not selected, the level does not do anything. This must be a postive number (min value: 0).
Fractions are possible but only integers are supported.</td>
</tr>
<tr>
@ -342,7 +343,7 @@ When using a DataSet, the network is automatically updating to changes in the Da
<td>no</td>
<td>Horizontal position in pixels.
The horizontal position of the node will be fixed unless combined with the allowedToMoveX:true option.
The vertical position y may remain undefined.</td>
The vertical position y may remain undefined. This does not work with hierarchical layout.</td>
</tr>
<tr>
<td>y</td>
@ -350,7 +351,7 @@ When using a DataSet, the network is automatically updating to changes in the Da
<td>no</td>
<td>Vertical position in pixels.
The vertical position of the node will be fixed unless combined with the allowedToMoveY:true option.
The horizontal position x may remain undefined.</td>
The horizontal position x may remain undefined. This does not work with hierarchical layout.</td>
</tr>
</table>
@ -1000,13 +1001,13 @@ All options defined per-node override these global settings.
<td>widthMin</td>
<td>Number</td>
<td>16</td>
<td>The minimum width for a scaled image. Only applicable to shape <code>image</code>.</td>
<td>The minimum width for a scaled image. Only applicable to shape <code>image</code>. This only does something if you supply a value.</td>
</tr>
<tr>
<td>widthMax</td>
<td>Number</td>
<td>64</td>
<td>The maximum width for a scaled image. Only applicable to shape <code>image</code>.</td>
<td>The maximum width for a scaled image. Only applicable to shape <code>image</code>. This only does something if you supply a value.</td>
</tr>
<tr>
@ -1021,14 +1022,14 @@ All options defined per-node override these global settings.
<td>Number</td>
<td>10</td>
<td>The minimum radius for a scaled node. Only applicable to shapes <code>dot</code>,
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>.</td>
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>. This only does something if you supply a value.</td>
</tr>
<tr>
<td>radiusMax</td>
<td>Number</td>
<td>30</td>
<td>The maximum radius for a scaled node. Only applicable to shapes <code>dot</code>,
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>.</td>
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>. This only does something if you supply a value.</td>
</tr>
</table>
@ -1224,13 +1225,13 @@ var options = {
<td>widthMin</td>
<td>Number</td>
<td>1</td>
<td>The minimum thickness of the line when using per-edge defined values.</td>
<td>The minimum thickness of the line when using per-edge defined values. This does nothing if you have not defined a value.</td>
</tr>
<tr>
<td>widthMax</td>
<td>Number</td>
<td>15</td>
<td>The maximum thickness of the line when using per-edge defined values.</td>
<td>The maximum thickness of the line when using per-edge defined values. This does nothing if you have not defined a value.</td>
</tr>
</table>
@ -1905,7 +1906,8 @@ var options = {
x: 10,
y: 10,
zoom: 0.02
}
},
bindToWindow: true
}
}
</pre>
@ -1937,6 +1939,12 @@ var options = {
<td>0.02</td>
<td>This defines the zoomspeed when using the keyboard navigation.</td>
</tr>
<tr>
<td>bindToWindow</td>
<td>Boolean</td>
<td>true</td>
<td>If this is true, global keyboard events will be used. If it is false, the keyboard events are only used when the network is active. It is activated on mouseOver automatically.</td>
<td>A template function used to generate the contents of the items. The function is called by the Timeline with an items data as argument, and must return HTML code as result. When the option template is specified, the items do not need to have a field <code>content</code>. See section <ahref="#Templates">Templates</a> for a detailed explanation.</td>
</tr>
<tr>
<td>timeAxis.scale</td>
<td>string</td>
<td>none</td>
<td>Set a fixed scale for the time axis of the Timeline. Choose from <code>'millisecond'</code>, <code>'second'</code>, <code>'minute'</code>, <code>'hour'</code>, <code>'weekday'</code>, <code>'day'</code>, <code>'month'</code>, <code>'year'</code>. Example usage:
<preclass="prettyprint lang-js">var options = {
timeAxis: {scale: 'minute', step: 5}
}</pre>
</td>
</tr>
<tr>
<td>timeAxis.step</td>
<td>number</td>
<td>1</td>
<td>
Set a fixed step size for the time axis. Only applicable when used together with <code>timeAxis.scale</code>.
this.timer=window.setTimeout(this._animationStep.bind(this),this.renderTimestep);// wait this.renderTimeStep milliseconds and perform the animation step function
@ -2595,12 +2619,12 @@ Network.prototype.animateView = function (options) {