Skip to content

Commit

Permalink
Mentioned 2 way data binding of DataSet in the Data Format sections i…
Browse files Browse the repository at this point in the history
…n the docs (see almende#1099)
  • Loading branch information
josdejong committed Jul 20, 2015
1 parent 3f19431 commit fd6b70c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
5 changes: 2 additions & 3 deletions docs/graph2d/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ <h1>Graph2d</h1>

<h2 id="Contents">Contents</h2>
<ul>
<li><a href="#Overview">Overview</a></li>
<li><a href="#Data_Format">Data Format</a>
<ul>
<li><a href="#items">Items</a></li>
Expand Down Expand Up @@ -227,7 +226,7 @@ <h2 id="Loading">Loading</h2>
Options is a name-value map in the JSON format. The available options
are described in section <a href="#Configuration_Options">Configuration Options</a>.
Groups is a vis <code>DataSet</code> containing groups. The available options and the method of construction
are described in section <a href="#Group_Options">Data Format</a>.
are described in section <a href="#Data_Format">Data Format</a>.
</p>
<pre class="prettyprint lang-js options">var graph = new vis.Graph2d(container [, data] [, groups] [, options]);</pre>
For backwards compatibility, groups and options can be interchanged.
Expand All @@ -245,7 +244,7 @@ <h2 id="Loading">Loading</h2>

<h2 id="Data_Format">Data Format</h2>
<p>
Graph2d can load data from an <code>Array</code>, a <code>DataSet</code> or a <code>DataView</code>.
Graph2d can load data from an <code>Array</code>, a <code>DataSet</code> (offering 2 way data binding), or a <code>DataView</code> (offering one way data binding).
Objects are added to this DataSet by using the <code>add()</code> function.
Data points must have properties <code>x</code>, <code>y</code>, and <code>z</code>,
and can optionally have a property <code>style</code> and <code>filter</code>.
Expand Down
2 changes: 1 addition & 1 deletion docs/graph3d/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ <h2 id="Loading">Loading</h2>

<h2 id="Data_Format">Data Format</h2>
<p>
Graph3d can load data from an <code>Array</code>, a <code>DataSet</code> or a <code>DataView</code>.
Graph3d can load data from an <code>Array</code>, a <code>DataSet</code> (offering 2 way data binding), or a <code>DataView</code> (offering 1 way data binding).
JSON objects are added to this DataSet by using the <code>add()</code> function.
Data points must have properties <code>x</code>, <code>y</code>, and <code>z</code>,
and can optionally have a property <code>style</code> and <code>filter</code>.
Expand Down
27 changes: 15 additions & 12 deletions docs/timeline/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,19 +209,20 @@ <h2 id="Data_Format">Data Format</h2>

<h3 id="items">Items</h3>
<p>
The Timeline uses regular Arrays and Objects as data format.
Data items can contain the properties <code>start</code>,
For items, the Timeline accepts an Array, a DataSet (offering 2 way data binding),
or a DataView (offering 1 way data binding).
Items are regular objects and can contain the properties <code>start</code>,
<code>end</code> (optional), <code>content</code>,
<code>group</code> (optional), <code>className</code> (optional),
<code>editable</code> (optional), and <code>style</code> (optional).
</p>

<p>
A table is constructed as:
A DataSet is constructed as:
</p>

<pre class="prettyprint lang-js">
var items = [
var items = new vis.DataSet([
{
start: new Date(2010, 7, 15),
end: new Date(2010, 8, 2), // end is optional
Expand Down Expand Up @@ -343,7 +344,9 @@ <h3 id="items">Items</h3>

<h3 id="groups">Groups</h3>
<p>
Like the items, groups are regular JavaScript Arrays and Objects.
For the items, groups can be an Array, a DataSet (offering 2 way data binding),
or a DataView (offering 1 way data binding).

Using groups, items can be grouped together.
Items are filtered per group, and displayed as

Expand Down Expand Up @@ -1120,9 +1123,9 @@ <h2 id="Methods">Methods</h2>
<td>none</td>
<td>Set both groups and items at once. Both properties are optional. This is a convenience method for individually calling both <code>setItems(items)</code> and <code>setGroups(groups)</code>.
Both <code>items</code> and <code>groups</code> can be an Array with Objects,
a DataSet, or a DataView. For each of the groups, the items of the
timeline are filtered on the property <code>group</code>, which
must correspond with the id of the group.
a DataSet (offering 2 way data binding), or a DataView (offering 1 way data binding).
For each of the groups, the items of the timeline are filtered on the
property <code>group</code>, which must correspond with the id of the group.
</td>
</tr>

Expand All @@ -1131,9 +1134,9 @@ <h2 id="Methods">Methods</h2>
<td>none</td>
<td>Set a data set with groups for the Timeline.
<code>groups</code> can be an Array with Objects,
a DataSet, or a DataView. For each of the groups, the items of the
timeline are filtered on the property <code>group</code>, which
must correspond with the id of the group.
a DataSet (offering 2 way data binding), or a DataView (offering 1 way data binding).
For each of the groups, the items of the timeline are filtered on the
property <code>group</code>, which must correspond with the id of the group.
</td>
</tr>

Expand All @@ -1142,7 +1145,7 @@ <h2 id="Methods">Methods</h2>
<td>none</td>
<td>Set a data set with items for the Timeline.
<code>items</code> can be an Array with Objects,
a DataSet, or a DataView.
a DataSet (offering 2 way data binding), or a DataView (offering 1 way data binding).
</td>
</tr>

Expand Down

0 comments on commit fd6b70c

Please sign in to comment.