Browse Source

updated folders 'dist', 'docs' and 'examples' from master

fixRailRoadSRFB
Alexander Wunschik 8 years ago
parent
commit
aa0e9c5706
178 changed files with 7262 additions and 12588 deletions
  1. BIN
      dist/img/timeline/delete.png
  2. +9
    -9
      dist/vis-graph3d.min.js
  3. +1
    -0
      dist/vis-network.min.css
  4. +17
    -17
      dist/vis-network.min.js
  5. +1
    -0
      dist/vis-timeline-graph2d.min.css
  6. +15
    -15
      dist/vis-timeline-graph2d.min.js
  7. +716
    -651
      dist/vis.css
  8. +4762
    -3245
      dist/vis.js
  9. +0
    -1
      dist/vis.map
  10. +1
    -1
      dist/vis.min.css
  11. +22
    -22
      dist/vis.min.js
  12. +6
    -3
      docs/data/dataset.html
  13. +2
    -1
      docs/data/dataview.html
  14. +2
    -1
      docs/data/index.html
  15. +5
    -4
      docs/graph2d/index.html
  16. +12
    -2
      docs/graph3d/index.html
  17. +1
    -0
      docs/network/configure.html
  18. +10
    -3
      docs/network/edges.html
  19. +2
    -1
      docs/network/groups.html
  20. +87
    -20
      docs/network/index.html
  21. +2
    -1
      docs/network/interaction.html
  22. +4
    -3
      docs/network/layout.html
  23. +2
    -1
      docs/network/manipulation.html
  24. +2
    -1
      docs/network/nodes.html
  25. +2
    -1
      docs/network/physics.html
  26. +0
    -949
      docs/old/dataset.html
  27. +0
    -338
      docs/old/dataview.html
  28. +0
    -673
      docs/old/graph3d.html
  29. +0
    -225
      docs/old/index.html
  30. +0
    -2
      docs/old/lib/prettify/lang-apollo.js
  31. +0
    -2
      docs/old/lib/prettify/lang-css.js
  32. +0
    -2
      docs/old/lib/prettify/lang-hs.js
  33. +0
    -2
      docs/old/lib/prettify/lang-lisp.js
  34. +0
    -2
      docs/old/lib/prettify/lang-lua.js
  35. +0
    -2
      docs/old/lib/prettify/lang-ml.js
  36. +0
    -1
      docs/old/lib/prettify/lang-proto.js
  37. +0
    -2
      docs/old/lib/prettify/lang-scala.js
  38. +0
    -2
      docs/old/lib/prettify/lang-sql.js
  39. +0
    -2
      docs/old/lib/prettify/lang-vb.js
  40. +0
    -3
      docs/old/lib/prettify/lang-vhdl.js
  41. +0
    -2
      docs/old/lib/prettify/lang-wiki.js
  42. +0
    -2
      docs/old/lib/prettify/lang-yaml.js
  43. +0
    -1
      docs/old/lib/prettify/prettify.css
  44. +0
    -33
      docs/old/lib/prettify/prettify.js
  45. +0
    -1165
      docs/old/old_graph2d.html
  46. +0
    -2625
      docs/old/old_network.html
  47. +0
    -210
      docs/old/old_network/canvas.html
  48. +0
    -181
      docs/old/old_network/clustering.html
  49. +0
    -126
      docs/old/old_network/rendering.html
  50. +0
    -134
      docs/old/old_network/selection.html
  51. +0
    -159
      docs/old/old_network/view.html
  52. +0
    -1510
      docs/old/old_timeline.html
  53. +122
    -23
      docs/timeline/index.html
  54. +1
    -1
      examples/graph2d/01_basic.html
  55. +1
    -1
      examples/graph2d/02_bars.html
  56. +1
    -1
      examples/graph2d/03_groups.html
  57. +1
    -1
      examples/graph2d/04_rightAxis.html
  58. +1
    -1
      examples/graph2d/05_bothAxis.html
  59. +1
    -1
      examples/graph2d/06_interpolation.html
  60. +1
    -1
      examples/graph2d/07_scrollingAndSorting.html
  61. +1
    -1
      examples/graph2d/08_performance.html
  62. +3
    -3
      examples/graph2d/09_external_legend.html
  63. +1
    -1
      examples/graph2d/10_barsSideBySide.html
  64. +1
    -1
      examples/graph2d/11_barsSideBySideGroups.html
  65. +1
    -1
      examples/graph2d/12_customRange.html
  66. +1
    -1
      examples/graph2d/13_localization.html
  67. +1
    -1
      examples/graph2d/14_toggleGroups.html
  68. +1
    -1
      examples/graph2d/15_streaming_data.html
  69. +1
    -1
      examples/graph2d/16_bothAxisTitles.html
  70. +1
    -1
      examples/graph2d/17_dynamicStyling.html
  71. +1
    -1
      examples/graph2d/18_scatterplot.html
  72. +1
    -1
      examples/graph2d/19_labels.html
  73. +1
    -1
      examples/graph2d/20_shading.html
  74. +19
    -5
      examples/graph3d/11_tooltips.html
  75. +4
    -0
      examples/graph3d/playground/index.html
  76. +1
    -0
      examples/graph3d/playground/playground.js
  77. +1
    -1
      examples/network/basicUsage.html
  78. +1
    -1
      examples/network/data/datasets.html
  79. +1
    -1
      examples/network/data/dotLanguage/dotLanguage.html
  80. +1
    -1
      examples/network/data/dotLanguage/dotPlayground.html
  81. +1
    -1
      examples/network/data/dynamicData.html
  82. +1
    -1
      examples/network/data/importingFromGephi.html
  83. +1
    -1
      examples/network/data/scalingCustom.html
  84. +1
    -1
      examples/network/data/scalingNodesEdges.html
  85. +1
    -1
      examples/network/data/scalingNodesEdgesLabels.html
  86. +55
    -0
      examples/network/edgeStyles/arrowTypes.html
  87. +1
    -1
      examples/network/edgeStyles/arrows.html
  88. +1
    -1
      examples/network/edgeStyles/colors.html
  89. +1
    -1
      examples/network/edgeStyles/dashes.html
  90. +1
    -1
      examples/network/edgeStyles/smooth.html
  91. +1
    -1
      examples/network/edgeStyles/smoothWorldCup.html
  92. +1
    -1
      examples/network/events/interactionEvents.html
  93. +1
    -1
      examples/network/events/physicsEvents.html
  94. +1
    -1
      examples/network/events/renderEvents.html
  95. +1
    -1
      examples/network/exampleApplications/disassemblerExample.html
  96. +1
    -1
      examples/network/exampleApplications/lesMiserables.html
  97. +1
    -1
      examples/network/exampleApplications/loadingBar.html
  98. +1
    -1
      examples/network/exampleApplications/neighbourhoodHighlight.html
  99. +1
    -1
      examples/network/exampleApplications/nodeLegend.html
  100. +1
    -1
      examples/network/exampleApplications/worldCupPerformance.html

BIN
dist/img/timeline/delete.png View File

Before After
Width: 16  |  Height: 16  |  Size: 665 B

+ 9
- 9
dist/vis-graph3d.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/vis-network.min.css
File diff suppressed because it is too large
View File


+ 17
- 17
dist/vis-network.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/vis-timeline-graph2d.min.css
File diff suppressed because it is too large
View File


+ 15
- 15
dist/vis-timeline-graph2d.min.js
File diff suppressed because it is too large
View File


+ 716
- 651
dist/vis.css
File diff suppressed because it is too large
View File


+ 4762
- 3245
dist/vis.js
File diff suppressed because it is too large
View File


+ 0
- 1
dist/vis.map
File diff suppressed because it is too large
View File


+ 1
- 1
dist/vis.min.css
File diff suppressed because it is too large
View File


+ 22
- 22
dist/vis.min.js
File diff suppressed because it is too large
View File


+ 6
- 3
docs/data/dataset.html View File

@ -57,6 +57,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -597,9 +598,11 @@ function (event, properties, senderId) {
<code>update</code>, and <code>remove</code>,
<code>properties</code> is always an object containing a property
<code>items</code>, which contains an array with the ids of the affected
items. The <code>update</code> event has an extra field <code>oldData</code>
containing the original data of the updated items, and a field <code>data</code>
containing the changes: the properties of the items that are being updated.
items. The <code>update</code> and <code>remove</code> events have an extra
field <code>oldData</code> containing the original data of the items in the
dataset before the items were updated or removed. The <code>update</code>
event also contains a field <code>data</code> containing the changes:
the properties of the items that are being updated.
</td>
</tr>
<tr>

+ 2
- 1
docs/data/dataview.html View File

@ -57,6 +57,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -409,4 +410,4 @@ view.on('*', function (event, properties, senderId) {
<script src="../js/tipuesearch.config.js"></script>
<script src="../js/tipuesearch.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>
<script src="../js/main.js"></script>

+ 2
- 1
docs/data/index.html View File

@ -57,6 +57,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -134,4 +135,4 @@
<script src="../js/tipuesearch.config.js"></script>
<script src="../js/tipuesearch.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>
<script src="../js/main.js"></script>

+ 5
- 4
docs/graph2d/index.html View File

@ -100,6 +100,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -568,7 +569,7 @@ function (value) {
<pre class="prettyprint lang-js">
drawPoints: true // or false
</pre>
2. <code>Object</code> (the 'rendering' options): If an object is provided it may contain following properties which all can be optional: <code>onRender</code>, <code>className</code><code>size</code> and/or <code>style</code>. For more information check the property's documentation.<br />
<pre class="prettyprint lang-js">
drawPoints: {
@ -576,7 +577,7 @@ drawPoints: {
style: 'square'
}
</pre>
3. <code>Function</code>: If a function is provided it will be used as a callback. The function may return values from listing 1 or 2.<br />
<pre class="prettyprint lang-js">
drawPoints: function(item, group) {
@ -673,7 +674,7 @@ onRender: function(item, group, graph2d) {
<td class="greenField indent">interpolation.parametrization</td>
<td>String</td>
<td>'centripetal'</td>
<td>Define the type of parametrizaion for the catmullRom interpolation. <a href="../../examples/graph2d/06_interpolation.html">Example 6</a> shows the different parametrizations. The options are 'centripetal' (best results), 'chordal' and 'uniform'. Uniform is the computationally cheapest variant.
<td>Define the type of parametrizaion for the catmullRom interpolation. <a href="../../examples/graph2d/07_scrollingAndSorting.html">Example 7</a> shows the different parametrizations. The options are 'centripetal' (best results), 'chordal' and 'uniform'. Uniform is the computationally cheapest variant.
If interpolation is disabled, linear interpolation is used.</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('g2dOptions','legend', this);">
@ -1201,7 +1202,7 @@ function (option, path) {
<tr>
<td>on(event, callback)</td>
<td>none</td>
<td>Create an event listener. The callback function is invoked every time the event is triggered. Avialable events: <code>rangechange</code>, <code>rangechanged</code>, <code>select</code>. The callback function is invoked as <code>callback(properties)</code>, where <code>properties</code> is an object containing event specific properties. See section <a href="#Events">Events for more information</a>.</td>
<td>Create an event listener. The callback function is invoked every time the event is triggered. Available events: <code>rangechange</code>, <code>rangechanged</code>, <code>select</code>. The callback function is invoked as <code>callback(properties)</code>, where <code>properties</code> is an object containing event specific properties. See section <a href="#Events">Events for more information</a>.</td>
</tr>
<tr>

+ 12
- 2
docs/graph3d/index.html View File

@ -12,7 +12,7 @@
<link href="../css/bootstrap.css" rel="stylesheet">
<!-- Tipue vendor css -->
<link href="../css/tipuesearch.css" rel="stylesheet">
<link href="../css/style.css" rel="stylesheet">
@ -57,6 +57,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -434,6 +435,14 @@ var options = {
when drawn in perspective.
</td>
</tr>
<tr>
<td>showLegend</td>
<td>boolean</td>
<td>none</td>
<td>If true, a legend is drawn for the graph (if the graph type supports it).
By default a legend is drawn for dot and dot-color style graphs.
</td>
</tr>
<tr>
<td>showShadow</td>
<td>boolean</td>
@ -465,7 +474,8 @@ var options = {
The contents of the tooltip can be customized by providing a callback
function as <code>tooltip</code>. In this case the function is called
with an object containing parameters <code>x</code>,
<code>y</code>, and <code>z</code> argument,
<code>y</code>, <code>z</code>, and <code>data</code>
(the source JS object for the point) as an argument,
and must return a string which may contain HTML.
</td>
</tr>

+ 1
- 0
docs/network/configure.html View File

@ -63,6 +63,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">

+ 10
- 3
docs/network/edges.html View File

@ -63,6 +63,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -114,9 +115,9 @@
var options = {
edges:{
arrows: {
to: {enabled: false, scaleFactor:1},
middle: {enabled: false, scaleFactor:1},
from: {enabled: false, scaleFactor:1}
to: {enabled: false, scaleFactor:1, type:'arrow'},
middle: {enabled: false, scaleFactor:1, type:'arrow'},
from: {enabled: false, scaleFactor:1, type:'arrow'}
},
arrowStrikethrough: true,
color: {
@ -242,6 +243,12 @@ network.setOptions(options);
<td><code>1</code></td>
<td>The scale factor allows you to change the size of the arrowhead.</td>
</tr>
<tr parent="arrows" class="hidden">
<td class="indent2">arrows.to.type</td>
<td>String</td>
<td><code>arrow</code></td>
<td>The type of endpoint. Default is <code>arrow</code>. Also possible is <code>circle</code>.</td>
</tr>
<tr parent="arrows" class="hidden">
<td class="indent">arrows.middle</td>
<td>Object or Boolean</td>

+ 2
- 1
docs/network/groups.html View File

@ -61,6 +61,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -173,4 +174,4 @@ var options = {
<script src="../js/tipuesearch.config.js"></script>
<script src="../js/tipuesearch.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>
<script src="../js/main.js"></script>

+ 87
- 20
docs/network/index.html View File

@ -92,6 +92,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -209,7 +210,20 @@
<ul>
<li><a href="#modules">Modules</a></li>
<li><a href="#options">Options</a></li>
<li><a href="#methods">Methods</a></li>
<li><a href="#methods">Method Reference</a>
<ul>
<li><a href="#methodGlobal">Global</a></li>
<li><a href="#methodCanvas">Canvas</a></li>
<li><a href="#methodClustering">Clustering</a></li>
<li><a href="#methodLayout">Layout</a></li>
<li><a href="#methodManipulation">Manipulation</a></li>
<li><a href="#methodInformation">Information</a></li>
<li><a href="#methodPhysics">Physics</a></li>
<li><a href="#methodSelection">Selection</a></li>
<li><a href="#methodViewport">Viewport</a></li>
<li><a href="#methodConfigurator">Configurator</a></li>
</ul>
</li>
<li><a href="#Events">Events</a></li>
<li><a href="#importing_data">Importing Data</a>
<ul>
@ -314,19 +328,23 @@ network.setOptions(options);
<tr><td id="event_locale">locale</td>
<td>String</td>
<td><code>'en'</code></td>
<td>Select the locale. By default, the language is English. If you want to use another language, you
will
need to define your own locale and refer to it here.
<td>Select the locale. By default, the language is English.
</td>
</tr>
<tr><td id="event_locales">locales</td>
<td>Object</td>
<td>defaultLocales</td>
<td>Locales object. By default only <code>'en'</code>, <code>'de'</code>, <code>'es'</code> and <code>'nl'</code> are supported. Take a look
at
the <a href="#locales" data-scroll=""
data-options="{ &quot;easing&quot;: &quot;easeInCubic&quot; }">locales
section below</a> for more explaination on how to customize this.
<td>Locales object. By default
<code>'en'</code>,
<code>'de'</code>,
<code>'es'</code>,
<code>'it'</code>,
<code>'nl'</code>
<code>'pt-br'</code>,
<code>'ru'</code>
are supported. Take a look at the
<a href="#locales" data-scroll="" data-options="{ &quot;easing&quot;: &quot;easeInCubic&quot; }">locales section below</a>
for more explaination on how to customize this.
</td>
</tr>
<tr><td id="event_clickToUse">clickToUse</td>
@ -419,7 +437,7 @@ var locales = {
the
modules listed above.</p>
<table class="methods-collapsable" id="methodTable">
<tr class="subHeader">
<tr id="methodGlobal" class="subHeader">
<td colspan="2">Global methods for the network.</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','destroy', this);">
@ -484,7 +502,7 @@ var locales = {
</tr>
<tr class="subHeader">
<tr id="methodCanvas" class="subHeader">
<td colspan="2">Methods related to the canvas.</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','canvasToDOM', this);">
@ -531,7 +549,7 @@ var locales = {
<td>Set the size of the canvas. This is automatically done on a window resize.</td>
</tr>
<tr class="subHeader">
<tr id="methodClustering" class="subHeader">
<td colspan="2">Clustering</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','cluster', this);">
@ -606,6 +624,49 @@ var locales = {
<code>network.clustering.findNode('fred')</code> will return <code>['A','B','C','fred']</code>.
</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','getClusteredEdges', this);">
<td colspan="2"><span parent="getClusteredEdges" class="right-caret" id="method_getClusteredEdges"></span> getClusteredEdges(
<code>String baseEdgeId</code>)
</tr>
<tr class="hidden" parent="getClusteredEdges">
<td class="midMethods">Returns: Array</td>
<td>Similiar to <code>findNode</code> in that it returns all the edge ids that were created from the provided edge during clustering
</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','getBaseEdge', this);">
<td colspan="2"><span parent="getBaseEdge" class="right-caret" id="method_getBaseEdge"></span> getBaseEdge(
<code>String clusteredEdgeId</code>)
</tr>
<tr class="hidden" parent="getBaseEdge">
<td class="midMethods">Returns: Value</td>
<td>When a clusteredEdgeId is available, this method will return the original baseEdgeId provided in <code>data.edges</code><br/>
ie. After clustering the 'SelectEdge' event is fired but provides only the clustered edge. This method can then be used to return the baseEdgeId.
</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','updateEdge', this);">
<td colspan="2"><span parent="updateEdge" class="right-caret" id="method_updateEdge"></span> updateEdge(
<code>String startEdgeId, Object options</code>)
</tr>
<tr class="hidden" parent="updateEdge">
<td class="midMethods">Returns: none</td>
<td>Visible edges between clustered nodes are not the same edge as the ones provided in <code>data.edges</code> passed on <code>network</code> creation<br/>
With each layer of clustering, copies of the edges between clusters are created and the previous edges are hidden, until the cluster is opened.<br/>
This method takes an edgeId (ie. a base edgeId from <data>data.edges</code>) and applys the options to it and any edges that were created from it while clustering.<br><br> Example:
<code>network.clustering.updateEdge(originalEdge.id, {color : '#aa0000'});</code><br/>
This would turn the base edge and any subsequent edges red, so when opening clusters the edges will all be the same color.
</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','updateClusteredNode', this);">
<td colspan="2"><span parent="updateClusteredNode" class="right-caret" id="method_updateClusteredNode"></span> updateClusteredNode(
<code>String clusteredNodeId, Object options</code>)
</tr>
<tr class="hidden" parent="updateClusteredNode">
<td class="midMethods">Returns: none</td>
<td>Clustered Nodes when created are not contained in the original <code>data.nodes</code> passed on <code>network</code> creation<br/>
This method updates the cluster node.<br><br> Example:
<code>network.clustering.updateClusteredNode(clusteredNodeId, {shape : 'star'});</code>
</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','isCluster', this);">
<td colspan="2"><span parent="isCluster" class="right-caret" id="method_isCluster"></span> isCluster(
<code>String nodeId</code>)
@ -648,7 +709,7 @@ function releaseFunction (clusterPosition, containedNodesPositions) {
</td>
</tr>
<tr class="subHeader">
<tr id="methodLayout" class="subHeader">
<td colspan="2">Layout</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','getSeed', this);">
@ -665,7 +726,7 @@ function releaseFunction (clusterPosition, containedNodesPositions) {
</tr>
<tr class="subHeader">
<tr id="methodManipulation" class="subHeader">
<td colspan="2">Manipulation methods to use the manipulation system without GUI.</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','enableEditMode', this);">
@ -726,7 +787,7 @@ function releaseFunction (clusterPosition, containedNodesPositions) {
</tr>
<tr class="subHeader">
<tr id="methodInformation" class="subHeader">
<td colspan="2">Methods to get information on nodes and edges.</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','getPositions', this);">
@ -824,7 +885,7 @@ function releaseFunction (clusterPosition, containedNodesPositions) {
</tr>
<tr class="subHeader">
<tr id="methodPhysics" class="subHeader">
<td colspan="2">Physics methods to control when the simulation should run.</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','startSimulation', this);">
@ -855,7 +916,7 @@ function releaseFunction (clusterPosition, containedNodesPositions) {
</tr>
<tr class="subHeader">
<tr id="methodSelection" class="subHeader">
<td colspan="2">Selection methods for nodes and edges.</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','getSelection', this);">
@ -970,7 +1031,7 @@ function releaseFunction (clusterPosition, containedNodesPositions) {
</tr>
<tr class="subHeader">
<tr id="methodViewport" class="subHeader">
<td colspan="2">Methods to control the viewport for zoom and animation.</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','getScale', this);">
@ -1082,7 +1143,7 @@ function releaseFunction (clusterPosition, containedNodesPositions) {
<td class="midMethods">Returns: none</td>
<td>Programatically release the focussed node.</td>
</tr>
<tr class="subHeader">
<tr id="methodConfigurator" class="subHeader">
<td colspan="2">Methods to use with the configurator module.</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','getOptionsFromConfigurator', this);">
@ -1180,7 +1241,13 @@ var options = {
node
any way you want. This is also the style object that is provided in the processProperties function
for
fine tuning. If undefined, default node options will be used.
fine tuning. If undefined, default node options will be used.<br/><br/>
Default functionality only allows clustering if the cluster will contain 2 or more nodes. To allow clustering of single nodes you can use the <code>allowSingleNodeCluster : true</code> property.
<pre class="prettyprint lang-js">
clusterNodeProperties: {
allowSingleNodeCluster: true
}
</pre>
</td>
</tr>
<tr><td id="event_clusterEdgeProperties">clusterEdgeProperties</td>

+ 2
- 1
docs/network/interaction.html View File

@ -56,6 +56,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -168,4 +169,4 @@ network.setOptions(options);
<script src="../js/tipuesearch.config.js"></script>
<script src="../js/tipuesearch.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>
<script src="../js/main.js"></script>

+ 4
- 3
docs/network/layout.html View File

@ -28,10 +28,10 @@
<script language="JavaScript">
smoothScroll.init();
</script>
<!-- Tipue vendor css -->
<link href="../css/tipuesearch.css" rel="stylesheet">
<script type="text/javascript" src="../js/toggleTable.js"></script>
</head>
<body onload="prettyPrint();">
@ -60,6 +60,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -165,4 +166,4 @@ network.setOptions(options);
<script src="../js/tipuesearch.config.js"></script>
<script src="../js/tipuesearch.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>
<script src="../js/main.js"></script>

+ 2
- 1
docs/network/manipulation.html View File

@ -56,6 +56,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -200,4 +201,4 @@ var options = {
<script src="../js/tipuesearch.config.js"></script>
<script src="../js/tipuesearch.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>
<script src="../js/main.js"></script>

+ 2
- 1
docs/network/nodes.html View File

@ -57,6 +57,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -385,7 +386,7 @@ network.setOptions(options);
<td>String</td>
<td><code>undefined</code></td>
<td>When not <code>undefined</code>, the node will belong to the defined group. Styling information of
that group will apply to this node. Node specific styling overrides group styling.
that group will apply to this node. Node specific styling overrides group styling.
</td>
</tr>
<tr>

+ 2
- 1
docs/network/physics.html View File

@ -57,6 +57,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
<form class="navbar-form navbar-right" role="search">
@ -220,4 +221,4 @@ network.setOptions(options);
<script src="../js/tipuesearch.config.js"></script>
<script src="../js/tipuesearch.js"></script>
<!-- controller -->
<script src="../js/main.js"></script>
<script src="../js/main.js"></script>

+ 0
- 949
docs/old/dataset.html View File

@ -1,949 +0,0 @@
<!doctype html>
<html>
<head>
<title>vis.js | DataSet documentation</title>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
<link href='css/old_style.css' type='text/css' rel='stylesheet'>
<script type="text/javascript" src="js/prettify/prettify.js"></script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body onload="prettyPrint();">
<div id="container">
<h1>DataSet documentation</h1>
<h2 id="Contents">Contents</h2>
<ul>
<li><a href="#Overview">Overview</a></li>
<li><a href="#Example">Example</a></li>
<li><a href="#Construction">Construction</a></li>
<li><a href="#Methods">Methods</a></li>
<li><a href="#Properties">Properties</a></li>
<li><a href="#Subscriptions">Subscriptions</a></li>
<li><a href="#Data_Manipulation">Data Manipulation</a></li>
<li><a href="#Data_Selection">Data Selection</a></li>
<li><a href="#Data_Policy">Data Policy</a></li>
</ul>
<h2 id="Overview">Overview</h2>
<p>
Vis.js comes with a flexible DataSet, which can be used to hold and
manipulate unstructured data and listen for changes in the data.
The DataSet is key/value based. Data items can be added, updated and
removed from the DatSet, and one can subscribe to changes in the DataSet.
The data in the DataSet can be filtered and ordered, and fields (like
dates) can be converted to a specific type. Data can be normalized when
appending it to the DataSet as well.
</p>
<h2 id="Example">Example</h2>
<p>
The following example shows how to use a DataSet.
</p>
<pre class="prettyprint lang-js">
// create a DataSet
var options = {};
var data = new vis.DataSet(options);
// add items
// note that the data items can contain different properties and data formats
data.add([
{id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
{id: 2, text: 'item 2', date: '2013-06-23', group: 2},
{id: 3, text: 'item 3', date: '2013-06-25', group: 2},
{id: 4, text: 'item 4'}
]);
// subscribe to any change in the DataSet
data.on('*', function (event, properties, senderId) {
console.log('event', event, properties);
});
// update an existing item
data.update({id: 2, group: 1});
// remove an item
data.remove(4);
// get all ids
var ids = data.getIds();
console.log('ids', ids);
// get a specific item
var item1 = data.get(1);
console.log('item1', item1);
// retrieve a filtered subset of the data
var items = data.get({
filter: function (item) {
return item.group == 1;
}
});
console.log('filtered items', items);
// retrieve formatted items
var items = data.get({
fields: ['id', 'date'],
type: {
date: 'ISODate'
}
});
console.log('formatted items', items);
</pre>
<h2 id="Construction">Construction</h2>
<p>
A DataSet can be constructed as:
</p>
<pre class="prettyprint lang-js">
var data = new vis.DataSet([data] [, options])
</pre>
<p>
After construction, data can be added to the DataSet using the methods
<code>add</code> and <code>update</code>, as described in section
<a href="#Data_Manipulation">Data Manipulation</a>.
</p>
<p>
The parameter <code>data</code> is optional and is an Array with items.
</p>
<p>
The parameter <code>options</code> is optional and is an object which can
contain the following properties:
</p>
<table>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default value</th>
<th>Description</th>
</tr>
<tr>
<td>fieldId</td>
<td>String</td>
<td>"id"</td>
<td>
The name of the field containing the id of the items.
When data is fetched from a server which uses some specific
field to identify items, this field name can be specified
in the DataSet using the option <code>fieldId</code>.
For example <a href="http://couchdb.apache.org/"
target="_blank">CouchDB</a> uses the field
<code>"_id"</code> to identify documents.
</td>
</tr>
<tr>
<td>type</td>
<td>Object.&lt;String,&nbsp;String&gt;</td>
<td>none</td>
<td>
An object containing field names as key, and data types as
value. By default, the type of the properties of items are left
unchanged. Item properties can be normalized by specifying a
field type. This is useful for example to automatically convert
stringified dates coming from a server into JavaScript Date
objects. The available data types are listed in section
<a href="#Data_Types">Data Types</a>.
</td>
</tr>
<tr>
<td>queue</td>
<td>Object | boolean</td>
<td>none</td>
<td>
Queue data changes ('add', 'update', 'remove') and flush them at once.
The queue can be flushed manually by calling
<code>DataSet.flush()</code>, or can be flushed after a configured delay
or maximum number of entries.
<br>
<br>
When <code>queue</code> is true, a queue is created
with default options. Options can be specified by providing an object:
<ul>
<li><code>delay: number</code><br>
The queue will be flushed automatically after an inactivity of this
delay in milliseconds. Default value is <code>null</code>.
<li><code>max: number</code><br>
When the queue exceeds the given maximum number
of entries, the queue is flushed automatically.
Default value is <code>Infinity</code>.
</li>
</ul>
</td>
</tr>
</table>
<h2 id="Methods">Methods</h2>
<p>DataSet contains the following methods.</p>
<table>
<colgroup>
<col width="200">
</colgroup>
<tr>
<th>Method</th>
<th>Return Type</th>
<th>Description</th>
</tr>
<tr>
<td>add(data [, senderId])</td>
<td>Number[]</td>
<td>Add one or multiple items to the DataSet. <code>data</code> can be a single item or an array with items. Adding an item will fail when there already is an item with the same id. The function returns an array with the ids of the added items. See section <a href="#Data_Manipulation">Data Manipulation</a>.</td>
</tr>
<tr>
<td>clear([senderId])</td>
<td>Number[]</td>
<td>Clear all data from the DataSet. The function returns an array with the ids of the removed items.</td>
</tr>
<tr>
<td>distinct(field)</td>
<td>Array</td>
<td>Find all distinct values of a specified field. Returns an unordered array containing all distinct values. If data items do not contain the specified field are ignored.</td>
</tr>
<tr>
<td>flush()</td>
<td>none</td>
<td>Flush queued changes. Only available when the DataSet is configured with the option <code>queue</code>, see section <a href="#Construction">Construction</a>.</td>
</tr>
<tr>
<td>forEach(callback [, options])</td>
<td>none</td>
<td>
Execute a callback function for every item in the dataset.
The available options are described in section <a href="#Data_Selection">Data Selection</a>.
</td>
</tr>
<tr>
<td>
get([options] [, data])<br>
get(id [,options] [, data])<br>
get(ids [, options] [, data])
</td>
<td>Object | Array</td>
<td>
Get a single item, multiple items, or all items from the DataSet.
Usage examples can be found in section <a href="#Getting_Data">Getting Data</a>, and the available <code>options</code> are described in section <a href="#Data_Selection">Data Selection</a>.
</td>
</tr>
<tr>
<td>
getDataSet()
</td>
<td>DataSet</td>
<td>
Get the DataSet itself. In case of a DataView, this function does not
return 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 <a href="#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>map(callback [, options])</td>
<td>Array</td>
<td>
Map every item in the DataSet.
The available options are described in section <a href="#Data_Selection">Data Selection</a>.
</td>
</tr>
<tr>
<td>max(field)</td>
<td>Object | null</td>
<td>
Find the item with maximum value of specified field. Returns <code>null</code> if no item is found.
</td>
</tr>
<tr>
<td>min(field)</td>
<td>Object | null</td>
<td>
Find the item with minimum value of specified field. Returns <code>null</code> if no item is found.
</td>
</tr>
<tr>
<td>off(event, callback)</td>
<td>none</td>
<td>
Unsubscribe from an event, remove an event listener. See section <a href="#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 <a href="#Subscriptions">Subscriptions</a>.
</td>
</tr>
<tr>
<td>
remove(id [, senderId])<br>
remove(ids [, senderId])
</td>
<td>Number[]</td>
<td>
Remove one or multiple items by id or by the items themselves. Returns an array with the ids of the removed items. See section <a href="#Data_Manipulation">Data Manipulation</a>.
</td>
</tr>
<tr>
<td>
setOptions(options)
</td>
<td>none</td>
<td>
Set options for the DataSet. Available options:
<ul>
<li>
<code>queue</code><br>
Queue data changes ('add', 'update', 'remove') and flush them at once.
The queue can be flushed manually by calling
<code>DataSet.flush()</code>, or can be flushed after a configured delay
or maximum number of entries.
<br>
<br>
When <code>queue</code> is true, a queue is created with default options.
When <code>queue</code> is false, an existing queue will be flushed and removed.
Options can be specified by providing an object:
<ul>
<li><code>delay: number</code><br>
The queue will be flushed automatically after an inactivity of this
delay in milliseconds. Default value is <code>null</code>.
<li><code>max: number</code><br>
When the queue exceeds the given maximum number
of entries, the queue is flushed automatically.
Default value is <code>Infinity</code>.
</li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td>
update(data [, senderId])
</td>
<td>Number[]</td>
<td>
Update on ore multiple existing items. <code>data</code> can be a single item or an array with items. When an item doesn't exist, it will be created. Returns an array with the ids of the removed items. See section <a href="#Data_Manipulation">Data Manipulation</a>.
</td>
</tr>
</table>
<h2 id="Properties">Properties</h2>
<p>DataSet contains the following properties.</p>
<table>
<colgroup>
<col width="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 DataSet.</td>
</tr>
</table>
<h2 id="Subscriptions">Subscriptions</h2>
<p>
One can subscribe on changes in a DataSet.
A subscription can be created using the method <code>on</code>,
and removed with <code>off</code>.
</p>
<pre class="prettyprint lang-js">
// create a DataSet
var data = new vis.DataSet();
// subscribe to any change in the DataSet
data.on('*', function (event, properties, senderId) {
console.log('event:', event, 'properties:', properties, 'senderId:', senderId);
});
// add an item
data.add({id: 1, text: 'item 1'}); // triggers an 'add' event
data.update({id: 1, text: 'item 1 (updated)'}); // triggers an 'update' event
data.remove(1); // triggers an 'remove' event
</pre>
<h3 id="On">On</h3>
<p>
Subscribe to an event.
</p>
Syntax:
<pre class="prettyprint lang-js">DataSet.on(event, callback)</pre>
Where:
<ul>
<li>
<code>event</code> is a String containing any of the events listed
in section <a href="#Events">Events</a>.
</li>
<li>
<code>callback</code> is a callback function which will be called
each time the event occurs. The callback function is described in
section <a href="#Callback">Callback</a>.
</li>
</ul>
<h3 id="Off">Off</h3>
<p>
Unsubscribe from an event.
</p>
Syntax:
<pre class="prettyprint lang-js">DataSet.off(event, callback)</pre>
Where <code>event</code> and <code>callback</code> correspond with the
parameters used to <a href="#On">subscribe</a> to the event.
<h3 id="Events">Events</h3>
<p>
The following events are available for subscription:
</p>
<table>
<tr>
<th>Event</th>
<th>Description</th>
</tr>
<tr>
<td>add</td>
<td>
The <code>add</code> event is triggered when an item
or a set of items is added, or when an item is updated while
not yet existing.
</td>
</tr>
<tr>
<td>update</td>
<td>
The <code>update</code> event is triggered when an existing item
or a set of existing items is updated.
</td>
</tr>
<tr>
<td>remove</td>
<td>
The <code>remove</code> event is triggered when an item
or a set of items is removed.
</td>
</tr>
<tr>
<td>*</td>
<td>
The <code>*</code> event is triggered when any of the events
<code>add</code>, <code>update</code>, and <code>remove</code>
occurs.
</td>
</tr>
</table>
<h3 id="Callback">Callback</h3>
<p>
The callback functions of subscribers are called with the following
parameters:
</p>
<pre class="prettyprint lang-js">
function (event, properties, senderId) {
// handle the event
});
</pre>
<p>
where the parameters are defined as
</p>
<table>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>event</td>
<td>String</td>
<td>
Any of the available events: <code>add</code>,
<code>update</code>, or <code>remove</code>.
</td>
</tr>
<tr>
<td>properties</td>
<td>Object&nbsp;|&nbsp;null</td>
<td>
Optional properties providing more information on the event.
In case of the events <code>add</code>,
<code>update</code>, and <code>remove</code>,
<code>properties</code> is always an object containing a property
<code>items</code>, which contains an array with the ids of the affected
items. The <code>update</code> event has an extra field <code>data</code>
containing the original data of the updated items, i.e. the gives the
changed fields of the changed items.
</td>
</tr>
<tr>
<td>senderId</td>
<td>String&nbsp;|&nbsp;Number</td>
<td>
An senderId, optionally provided by the application code
which triggered the event. If senderId is not provided, the
argument will be <code>null</code>.
</td>
</tr>
</table>
<h2 id="Data_Manipulation">Data Manipulation</h2>
<p>
The data in a DataSet can be manipulated using the methods
<a href="#Add"><code>add</code></a>,
<a href="#Update"><code>update</code></a>,
and <a href="#Remove"><code>remove</code></a>.
The DataSet can be emptied using the method
<a href="#Clear"><code>clear</code></a>.
</p>
<pre class="prettyprint lang-js">
// create a DataSet
var data = new vis.DataSet();
// add items
data.add([
{id: 1, text: 'item 1'},
{id: 2, text: 'item 2'},
{id: 3, text: 'item 3'}
]);
// update an item
data.update({id: 2, text: 'item 2 (updated)'});
// remove an item
data.remove(3);
</pre>
<h3 id="Add">Add</h3>
<p>
Add a data item or an array with items.
</p>
Syntax:
<pre class="prettyprint lang-js">var addedIds = DataSet.add(data [, senderId])</pre>
The argument <code>data</code> can contain:
<ul>
<li>
An <code>Object</code> containing a single item to be
added. The item must contain an id.
</li>
<li>
An <code>Array</code> containing a list with items to be added. Each item must contain an id.
</li>
</ul>
<p>
After the items are added to the DataSet, the DataSet will
trigger an event <code>add</code>. When a <code>senderId</code>
is provided, this id will be passed with the triggered
event to all subscribers.
</p>
<p>
The method will throw an Error when an item with the same id
as any of the added items already exists.
</p>
<h3 id="Update">Update</h3>
<p>
Update a data item or an array with items.
</p>
Syntax:
<pre class="prettyprint lang-js">var updatedIds = DataSet.update(data [, senderId])</pre>
The argument <code>data</code> can contain:
<ul>
<li>
An <code>Object</code> containing a single item to be
updated. The item must contain an id.
</li>
<li>
An <code>Array</code> containing a list with items to be updated. Each item must contain an id.
</li>
</ul>
<p>
The provided properties will be merged in the existing item.
When an item does not exist, it will be created.
</p>
<p>
After the items are updated, the DataSet will
trigger an event <code>add</code> for the added items, and
an event <code>update</code>. When a <code>senderId</code>
is provided, this id will be passed with the triggered
event to all subscribers.
</p>
<h3 id="Remove">Remove</h3>
<p>
Remove a data item or an array with items.
</p>
Syntax:
<pre class="prettyprint lang-js">var removedIds = DataSet.remove(id [, senderId])</pre>
<p>
The argument <code>id</code> can be:
</p>
<ul>
<li>
A <code>Number</code> or <code>String</code> containing the id
of a single item to be removed.
</li>
<li>
An <code>Object</code> containing the item to be deleted.
The item will be deleted by its id.
</li>
<li>
An Array containing ids or items to be removed.
</li>
</ul>
<p>
The method ignores removal of non-existing items, and returns an array
containing the ids of the items which are actually removed from the
DataSet.
</p>
<p>
After the items are removed, the DataSet will
trigger an event <code>remove</code> for the removed items.
When a <code>senderId</code> is provided, this id will be passed with
the triggered event to all subscribers.
</p>
<h3 id="Clear">Clear</h3>
<p>
Clear the complete DataSet.
</p>
Syntax:
<pre class="prettyprint lang-js">var removedIds = DataSet.clear([senderId])</pre>
<p>
After the items are removed, the DataSet will
trigger an event <code>remove</code> for all removed items.
When a <code>senderId</code> is provided, this id will be passed with
the triggered event to all subscribers.
</p>
<h2 id="Data_Selection">Data Selection</h2>
<p>
The DataSet contains functionality to format, filter, and sort data retrieved via the
methods <code>get</code>, <code>getIds</code>, <code>forEach</code>, and <code>map</code>. These methods have the following syntax:
</p>
<pre class="prettyprint lang-js">
DataSet.get([id] [, options]);
DataSet.getIds([options]);
DataSet.forEach(callback [, options]);
DataSet.map(callback [, options]);
</pre>
<p>
Where <code>options</code> is an Object which can have the following
properties:
</p>
<table>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>fields</td>
<td>String[&nbsp;] | Object.&lt;String,&nbsp;String&gt;</td>
<td>
An array with field names, or an object with current field name and
new field name that the field is returned as.
By default, all properties of the items are emitted.
When <code>fields</code> is defined, only the properties
whose name is specified in <code>fields</code> will be included
in the returned items.
</td>
</tr>
<tr>
<td>type</td>
<td>Object.&lt;String,&nbsp;String&gt;</td>
<td>
An object containing field names as key, and data types as value.
By default, the type of the properties of an item are left
unchanged. When a field type is specified, this field in the
items will be converted to the specified type. This can be used
for example to convert ISO strings containing a date to a
JavaScript Date object, or convert strings to numbers or vice
versa. The available data types are listed in section
<a href="#Data_Types">Data Types</a>.
</td>
</tr>
<tr>
<td>filter</td>
<td>Function</td>
<td>Items can be filtered on specific properties by providing a filter
function. A filter function is executed for each of the items in the
DataSet, and is called with the item as parameter. The function must
return a boolean. All items for which the filter function returns
true will be emitted.
See section <a href="#Data_Filtering">Data Filtering</a>.</td>
</tr>
<tr>
<td>order</td>
<td>String | Function</td>
<td>Order the items by a field name or custom sort function.</td>
</tr>
<tr>
<td>returnType</td>
<td>String</td>
<td>Determine the type of output of the get function. Allowed values are <code>'Array' | 'Object'</code>.
The default returnType is an Array. The Object type will return a JSON object with the ID's as keys.</td>
</tr>
</table>
<p>
The following example demonstrates formatting properties and filtering
properties from items.
</p>
<pre class="prettyprint lang-js">
// create a DataSet
var data = new vis.DataSet();
data.add([
{id: 1, text: 'item 1', date: '2013-06-20', group: 1, first: true},
{id: 2, text: 'item 2', date: '2013-06-23', group: 2},
{id: 3, text: 'item 3', date: '2013-06-25', group: 2},
{id: 4, text: 'item 4'}
]);
// retrieve formatted items
var items = data.get({
fields: ['id', 'date', 'group'], // output the specified fields only
type: {
date: 'Date', // convert the date fields to Date objects
group: 'String' // convert the group fields to Strings
}
});
</pre>
<h3 id="Getting_Data">Getting Data</h3>
<p>
Data can be retrieved from the DataSet using the method <code>get</code>.
This method can return a single item or a list with items.
</p>
<p>A single item can be retrieved by its id:</p>
<pre class="prettyprint lang-js">
var item1 = dataset.get(1);
</pre>
<p>A selection of items can be retrieved by providing an array with ids:</p>
<pre class="prettyprint lang-js">
var items = dataset.get([1, 3, 4]); // retrieve items 1, 3, and 4
</pre>
<p>All items can be retrieved by simply calling <code>get</code> without
specifying an id:</p>
<pre class="prettyprint lang-js">
var items = dataset.get(); // retrieve all items
</pre>
<h3 id="Data_Filtering">Data Filtering</h3>
<p>
Items can be filtered on specific properties by providing a filter
function. A filter function is executed for each of the items in the
DataSet, and is called with the item as parameter. The function must
return a boolean. All items for which the filter function returns
true will be emitted.
</p>
<pre class="prettyprint lang-js">
// retrieve all items having a property group with value 2
var group2 = dataset.get({
filter: function (item) {
return (item.group == 2);
}
});
// retrieve all items having a property balance with a value above zero
var positiveBalance = dataset.get({
filter: function (item) {
return (item.balance > 0);
}
});
</pre>
<h3 id="Data_Types">Data Types</h3>
<p>
DataSet supports the following data types:
</p>
<table style="width: 100%">
<tr>
<th>Name</th>
<th>Description</th>
<th>Examples</th>
</tr>
<tr>
<td>Boolean</td>
<td>A JavaScript Boolean</td>
<td>
<code>true</code><br>
<code>false</code>
</td>
</tr>
<tr>
<td>Number</td>
<td>A JavaScript Number</td>
<td>
<code>32</code><br>
<code>2.4</code>
</td>
</tr>
<tr>
<td>String</td>
<td>A JavaScript String</td>
<td>
<code>"hello world"</code><br>
<code>"2013-06-28"</code>
</td>
</tr>
<tr>
<td>Date</td>
<td>A JavaScript Date object</td>
<td>
<code>new Date()</code><br>
<code>new Date(2013, 5, 28)</code><br>
<code>new Date(1372370400000)</code>
</td>
</tr>
<tr>
<td>Moment</td>
<td>A Moment object, created with
<a href="http://momentjs.com/" target="_blank">moment.js</a></td>
<td>
<code>moment()</code><br>
<code>moment('2013-06-28')</code>
</td>
</tr>
<tr>
<td>ISODate</td>
<td>A string containing an ISO Date</td>
<td>
<code>new Date().toISOString()</code><br>
<code>"2013-06-27T22:00:00.000Z"</code>
</td>
</tr>
<tr>
<td>ASPDate</td>
<td>A string containing an ASP Date</td>
<td>
<code>"/Date(1372370400000)/"</code><br>
<code>"/Date(1198908717056-0700)/"</code>
</td>
</tr>
</table>
<h2 id="Data_Policy">Data Policy</h2>
<p>
All code and data is processed and rendered in the browser.
No data is sent to any server.
</p>
</div>
</body>
</html>

+ 0
- 338
docs/old/dataview.html View File

@ -1,338 +0,0 @@
<!doctype html>
<html>
<head>
<title>vis.js | DataView documentation</title>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
<link href='css/old_style.css' type='text/css' rel='stylesheet'>
<script type="text/javascript" src="js/prettify/prettify.js"></script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body onload="prettyPrint();">
<div id="container">
<h1>DataView documentation</h1>
<h2 id="Contents">Contents</h2>
<ul>
<li><a href="#Overview">Overview</a></li>
<li><a href="#Example">Example</a></li>
<li><a href="#Construction">Construction</a></li>
<li><a href="#Methods">Methods</a></li>
<li><a href="#Properties">Properties</a></li>
<li><a href="#Getting_Data">Getting Data</a></li>
<li><a href="#Subscriptions">Subscriptions</a></li>
<li><a href="#Data_Policy">Data Policy</a></li>
</ul>
<h2 id="Overview">Overview</h2>
<p>
A DataView offers a filtered and/or formatted view on a
<a href="dataset.html">DataSet</a>.
One can subscribe on changes in a DataView, and easily get filtered or
formatted data without having to specify filters and field types all
the time.
</p>
<h2 id="Example">Example</h2>
<p>
The following example shows how to use a DataView.
</p>
<pre class="prettyprint lang-js">
// create a DataSet
var data = new vis.DataSet();
data.add([
{id: 1, text: 'item 1', date: new Date(2013, 6, 20), group: 1, first: true},
{id: 2, text: 'item 2', date: '2013-06-23', group: 2},
{id: 3, text: 'item 3', date: '2013-06-25', group: 2},
{id: 4, text: 'item 4'}
]);
// create a DataView
// the view will only contain items having a property group with value 1,
// and will only output fields id, text, and date.
var view = new vis.DataView(data, {
filter: function (item) {
return (item.group == 1);
},
fields: ['id', 'text', 'date']
});
// subscribe to any change in the DataView
view.on('*', function (event, properties, senderId) {
console.log('event', event, properties);
});
// update an item in the data set
data.update({id: 2, group: 1});
// get all ids in the view
var ids = view.getIds();
console.log('ids', ids); // will output [1, 2]
// get all items in the view
var items = view.get();
</pre>
<h2 id="Construction">Construction</h2>
<p>
A DataView can be constructed as:
</p>
<pre class="prettyprint lang-js">
var data = new vis.DataView(dataset, options)
</pre>
<p>
where:
</p>
<ul>
<li>
<code>dataset</code> is a DataSet or DataView.
</li>
<li>
<code>options</code> is an object which can
contain the following properties. Note that these properties
are exactly the same as the properties available in methods
<code>DataSet.get</code> and <code>DataView.get</code>.
<table>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>convert</td>
<td>Object.&lt;String,&nbsp;String&gt;</td>
<td>
An object containing field names as key, and data types as value.
By default, the type of the properties of an item are left
unchanged. When a field type is specified, this field in the
items will be converted to the specified type. This can be used
for example to convert ISO strings containing a date to a
JavaScript Date object, or convert strings to numbers or vice
versa. The available data types are listed in section
<a href="dataset.html#Data_Types">Data Types</a>.
</td>
</tr>
<tr>
<td>fields</td>
<td>String[&nbsp;] | Object.&lt;String,&nbsp;String&gt;</td>
<td>
An array with field names, or an object with current field name and
new field name that the field is returned as.
By default, all properties of the items are emitted.
When <code>fields</code> is defined, only the properties
whose name is specified in <code>fields</code> will be included
in the returned items.
</td>
</tr>
<tr>
<td>filter</td>
<td>function</td>
<td>Items can be filtered on specific properties by providing a filter
function. A filter function is executed for each of the items in the
DataSet, and is called with the item as parameter. The function must
return a boolean. All items for which the filter function returns
true will be emitted.
See also section <a href="dataset.html#Data_Filtering">Data Filtering</a>.</td>
</tr>
</table>
</li>
</ul>
<h2 id="Methods">Methods</h2>
<p>DataView contains the following methods.</p>
<table>
<colgroup>
<col width="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</td>
<td>
Get a single item, multiple items, or all items from the DataView.
Usage examples can be found in section <a href="#Getting_Data">Getting Data</a>, and the available <code>options</code> are described in section <a href="#Data_Selection">Data Selection</a>.
</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 <a href="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 <a href="#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 <a href="#Subscriptions">Subscriptions</a>.
</td>
</tr>
<tr>
<td>refresh()</td>
<td>none</td>
<td>
Refresh the filter results of a DataView. Useful when the filter function contains dynamic properties, like:
<pre class="prettyprint lang-js">var data = new vis.DataSet(...);
var view = new vis.DataView(data, {
filter: function (item) {
return item.value > threshold;
}
});</pre>
In this example, <code>threshold</code> is an external parameter. When the value of <code>threshold</code> changes, the DataView must be notified that the filter results may have changed by calling <code>DataView.refresh()</code>.
</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>
<h2 id="Properties">Properties</h2>
<p>DataView contains the following properties.</p>
<table>
<colgroup>
<col width="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>
<h2 id="Getting_Data">Getting Data</h2>
<p>
Data of the DataView can be retrieved using the method <code>get</code>.
</p>
<pre class="prettyprint lang-js">
var items = view.get();
</pre>
<p>
Data of a DataView can be filtered and formatted again, in exactly the
same way as in a DataSet. See sections
<a href="dataset.html#Data_Manipulation">Data Manipulation</a> and
<a href="dataset.html#Data_Selection">Data Selection</a> for more
information.
</p>
<pre class="prettyprint lang-js">
var items = view.get({
fields: ['id', 'score'],
filter: function (item) {
return (item.score > 50);
}
});
</pre>
<h2 id="Subscriptions">Subscriptions</h2>
<p>
One can subscribe on changes in the DataView. Subscription works exactly
the same as for DataSets. See the documentation on
<a href="dataset.html#Subscriptions">subscriptions in a DataSet</a>
for more information.
</p>
<pre class="prettyprint lang-js">
// create a DataSet and a view on the data set
var data = new vis.DataSet();
var view = new vis.DataView({
filter: function (item) {
return (item.group == 2);
}
});
// subscribe to any change in the DataView
view.on('*', function (event, properties, senderId) {
console.log('event:', event, 'properties:', properties, 'senderId:', senderId);
});
// add, update, and remove data in the DataSet...
</pre>
<h2 id="Data_Policy">Data Policy</h2>
<p>
All code and data is processed and rendered in the browser.
No data is sent to any server.
</p>
</div>
</body>
</html>

+ 0
- 673
docs/old/graph3d.html View File

@ -1,673 +0,0 @@
<html>
<head>
<title>vis.js | graph3d documentation</title>
<link href='../css/prettify.css' type='text/css' rel='stylesheet'>
<link href='../css/style.css' type='text/css' rel='stylesheet'>
<script type="text/javascript" src="../js/prettify/prettify.js"></script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body onload="prettyPrint();">
<div id="container">
<h1>Graph3d documentation</h1>
<h2 id="Overview">Overview</h2>
<p>
Graph3d is an interactive visualization chart to draw data in a three dimensional
graph. You can freely move and zoom in the graph by dragging and scrolling in the
window. Graph3d also supports animation of a graph.
</p>
<p>
Graph3d uses <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Canvas">HTML canvas</a>
to render graphs, and can render up to a few thousands of data points smoothly.
</p>
<h2 id="Contents">Contents</h2>
<ul>
<li><a href="#Overview">Overview</a></li>
<li><a href="#Loading">Loading</a></li>
<li><a href="#Data_Format">Data Format</a></li>
<li><a href="#Configuration_Options">Configuration Options</a></li>
<li><a href="#Methods">Methods</a></li>
<li><a href="#Events">Events</a></li>
<li><a href="#Data_Policy">Data Policy</a></li>
</ul>
<h2 id="Example">Example</h2>
<p>
The following code shows how to create a Graph3d and provide it with data.
More examples can be found in the <a href="../../examples">examples</a> directory.
</p>
<pre class="prettyprint lang-html">
&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Graph 3D demo&lt;/title&gt;
&lt;style&gt;
body {font: 10pt arial;}
&lt;/style&gt;
&lt;script type="text/javascript" src="../../dist/vis.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
var data = null;
var graph = null;
function custom(x, y) {
return (Math.sin(x/50) * Math.cos(y/50) * 50 + 50);
}
// Called when the Visualization API is loaded.
function drawVisualization() {
// Create and populate a data table.
var data = new vis.DataSet();
// create some nice looking data with sin/cos
var steps = 50; // number of datapoints will be steps*steps
var axisMax = 314;
var axisStep = axisMax / steps;
for (var x = 0; x &lt; axisMax; x+=axisStep) {
for (var y = 0; y &lt; axisMax; y+=axisStep) {
var value = custom(x, y);
data.add({
x: x,
y: y,
z: value,
style: value
});
}
}
// specify options
var options = {
width: '600px',
height: '600px',
style: 'surface',
showPerspective: true,
showGrid: true,
showShadow: false,
keepAspectRatio: true,
verticalRatio: 0.5
};
// create a graph3d
var container = document.getElementById('mygraph');
graph3d = new vis.Graph3d(container, data, options);
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload="drawVisualization();"&gt;
&lt;div id="mygraph"&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h2 id="Loading">Loading</h2>
<p>
The class name of the Graph3d is <code>vis.Graph3d</code>.
When constructing a Graph3d, an HTML DOM container must be provided to attach
the graph to. Optionally, data an options can be provided.
Data is a vis <code>DataSet</code> or an <code>Array</code>, described in
section <a href="#Data_Format">Data Format</a>.
Options is a name-value map in the JSON format. The available options
are described in section <a href="#Configuration_Options">Configuration Options</a>.
</p>
<pre class="prettyprint lang-js">var graph = new vis.Graph3d(container [, data] [, options]);</pre>
<p>
Data and options can be set or changed later on using the functions
<code>Graph3d.setData(data)</code> and <code>Graph3d.setOptions(options)</code>.
</p>
<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>.
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>.
<h3>Definition</h3>
<p>
The DataSet JSON objects are defined as:
</p>
<table>
<tr>
<th>Name</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
<tr>
<td>x</td>
<td>number</td>
<td>yes</td>
<td>Location on the x-axis.</td>
</tr>
<tr>
<td>y</td>
<td>number</td>
<td>yes</td>
<td>Location on the y-axis.</td>
</tr>
<tr>
<td>z</td>
<td>number</td>
<td>yes</td>
<td>Location on the z-axis.</td>
</tr>
<tr>
<td>style</td>
<td>number</td>
<td>no</td>
<td>The data value, required for graph styles <code>dot-color</code> and
<code>dot-size</code>.
</td>
</tr>
<tr>
<td>filter</td>
<td>*</td>
<td>no</td>
<td>Filter values used for the animation.
This column may have any type, such as a number, string, or Date.</td>
</tr>
</table>
<h2 id="Configuration_Options">Configuration Options</h2>
<p>
Options can be used to customize the graph. Options are defined as a JSON object.
All options are optional.
</p>
<pre class="prettyprint lang-js">
var options = {
width: '100%',
height: '400px',
style: 'surface'
};
</pre>
<p>
The following options are available.
</p>
<table>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr>
<td>animationInterval</td>
<td>number</td>
<td>1000</td>
<td>The animation interval in milliseconds. This determines how fast
the animation runs.</td>
</tr>
<tr>
<td>animationPreload</td>
<td>boolean</td>
<td>false</td>
<td>If false, the animation frames are loaded as soon as they are requested.
if <code>animationPreload</code> is true, the graph will automatically load
all frames in the background, resulting in a smoother animation as soon as
all frames are loaded. The load progress is shown on screen.</td>
</tr>
<tr>
<td>animationAutoStart</td>
<td>boolean</td>
<td>false</td>
<td>If true, the animation starts playing automatically after the graph
is created.</td>
</tr>
<tr>
<td>backgroundColor</td>
<td>string or Object</td>
<td>'white'</td>
<td>The background color for the main area of the chart.
Can be either a simple HTML color string, for example: 'red' or '#00cc00',
or an object with the following properties.</td>
</tr>
<tr>
<td>backgroundColor.stroke</td>
<td>string</td>
<td>'gray'</td>
<td>The color of the chart border, as an HTML color string.</td>
</tr>
<tr>
<td>backgroundColor.strokeWidth</td>
<td>number</td>
<td>1</td>
<td>The border width, in pixels.</td>
</tr>
<tr>
<td>backgroundColor.fill</td>
<td>string</td>
<td>'white'</td>
<td>The chart fill color, as an HTML color string.</td>
</tr>
<tr>
<td>cameraPosition</td>
<td>Object</td>
<td>{horizontal:&nbsp;1.0, vertical:&nbsp;0.5, distance:&nbsp;1.7}</td>
<td>Set the initial rotation and position of the camera.
The object <code>cameraPosition</code> contains three parameters:
<code>horizontal</code>, <code>vertical</code>, and <code>distance</code>.
Parameter <code>horizontal</code> is a value in radians and can have any
value (but normally in the range of 0 and 2*Pi).
Parameter <code>vertical</code> is a value in radians between 0 and 0.5*Pi.
Parameter <code>distance</code> is the (normalized) distance from the
camera to the center of the graph, in the range of 0.71 to 5.0. A
larger distance puts the graph further away, making it smaller.
All parameters are optional.
</tr>
<tr>
<td>height</td>
<td>string</td>
<td>'400px'</td>
<td>The height of the graph in pixels or as a percentage.</td>
</tr>
<tr>
<td>keepAspectRatio</td>
<td>boolean</td>
<td>true</td>
<td>If <code>keepAspectRatio</code> is true, the x-axis and the y-axis
keep their aspect ratio. If false, the axes are scaled such that they
both have the same, maximum with.</td>
</tr>
<tr>
<td>showAnimationControls</td>
<td>boolean</td>
<td>true</td>
<td>If true, animation controls are created at the bottom of the Graph.
The animation controls consists of buttons previous, start/stop, next,
and a slider showing the current frame.
Only applicable when the provided data contains an animation.</td>
</tr>
<tr>
<td>showGrid</td>
<td>boolean</td>
<td>true</td>
<td>If true, grid lines are draw in the x-y surface (the bottom of the 3d
graph).</td>
</tr>
<tr>
<td>showPerspective</td>
<td>boolean</td>
<td>true</td>
<td>If true, the graph is drawn in perspective: points and lines which
are further away are drawn smaller.
Note that the graph currently does not support a gray colored bottom side
when drawn in perspective.
</td>
</tr>
<tr>
<td>showShadow</td>
<td>boolean</td>
<td>false</td>
<td>Show shadow on the graph.</td>
</tr>
<tr>
<td>style</td>
<td>string</td>
<td>'dot'</td>
<td>The style of the 3d graph. Available styles:
<code>bar</code>,
<code>bar-color</code>,
<code>bar-size</code>,
<code>dot</code>,
<code>dot-line</code>,
<code>dot-color</code>,
<code>dot-size</code>,
<code>line</code>,
<code>grid</code>,
or <code>surface</code></td>
</tr>
<tr>
<td>tooltip</td>
<td>boolean | function</td>
<td>false</td>
<td>Show a tooltip showing the values of the hovered data point.
The contents of the tooltip can be customized by providing a callback
function as <code>tooltip</code>. In this case the function is called
with an object containing parameters <code>x</code>,
<code>y</code>, and <code>z</code> argument,
and must return a string which may contain HTML.
</td>
</tr>
<tr>
<td>valueMax</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the value-axis. Only available in combination
with the styles <code>dot-color</code> and <code>dot-size</code>.</td>
</tr>
<tr>
<td>valueMin</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the value-axis. Only available in combination
with the styles <code>dot-color</code> and <code>dot-size</code>.</td>
</tr>
<tr>
<td>verticalRatio</td>
<td>number</td>
<td>0.5</td>
<td>A value between 0.1 and 1.0. This scales the vertical size of the graph
When keepAspectRatio is set to false, and verticalRatio is set to 1.0,
the graph will be a cube.</td>
</tr>
<tr>
<td>width</td>
<td>string</td>
<td>'400px'</td>
<td>The width of the graph in pixels or as a percentage.</td>
</tr>
<tr>
<td>xBarWidth</td>
<td>number</td>
<td>none</td>
<td>The width of bars in x direction. By default, the width is equal to the distance
between the data points, such that bars adjoin each other.
Only applicable for styles <code>'bar'</code> and <code>'bar-color'</code>.</td>
</tr>
<tr>
<td>xCenter</td>
<td>string</td>
<td>'55%'</td>
<td>The horizontal center position of the graph, as a percentage or in
pixels.</td>
</tr>
<tr>
<td>xMax</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the x-axis.</td>
</tr>
<tr>
<td>xMin</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the x-axis.</td>
</tr>
<tr>
<td>xStep</td>
<td>number</td>
<td>none</td>
<td>Step size for the grid on the x-axis.</td>
</tr>
<tr>
<td>xValueLabel</td>
<td>function</td>
<td>none</td>
<td>A function for custom formatting of the labels along the x-axis,
for example <code>function (x) {return (x * 100) + '%'}</code>.
</td>
</tr>
<tr>
<td>yBarWidth</td>
<td>number</td>
<td>none</td>
<td>The width of bars in y direction. By default, the width is equal to the distance
between the data points, such that bars adjoin each other.
Only applicable for styles <code>'bar'</code> and <code>'bar-color'</code>.</td>
</tr>
<tr>
<td>yCenter</td>
<td>string</td>
<td>'45%'</td>
<td>The vertical center position of the graph, as a percentage or in
pixels.</td>
</tr>
<tr>
<td>yMax</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the y-axis.</td>
</tr>
<tr>
<td>yMin</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the y-axis.</td>
</tr>
<tr>
<td>yStep</td>
<td>number</td>
<td>none</td>
<td>Step size for the grid on the y-axis.</td>
</tr>
<tr>
<td>yValueLabel</td>
<td>function</td>
<td>none</td>
<td>A function for custom formatting of the labels along the y-axis,
for example <code>function (y) {return (y * 100) + '%'}</code>.
</td>
</tr>
<tr>
<td>zMin</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the z-axis.</td>
</tr>
<tr>
<td>zMax</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the z-axis.</td>
</tr>
<tr>
<td>zStep</td>
<td>number</td>
<td>none</td>
<td>Step size for the grid on the z-axis.</td>
</tr>
<tr>
<td>zValueLabel</td>
<td>function</td>
<td>none</td>
<td>A function for custom formatting of the labels along the z-axis,
for example <code>function (z) {return (z * 100) + '%'}</code>.
</td>
</tr>
<tr>
<td>xLabel</td>
<td>String</td>
<td>x</td>
<td>Label on the X axis.</td>
</tr>
<tr>
<td>yLabel</td>
<td>String</td>
<td>y</td>
<td>Label on the Y axis.</td>
</tr>
<tr>
<td>zLabel</td>
<td>String</td>
<td>z</td>
<td>Label on the Z axis.</td>
</tr>
<tr>
<td>filterLabel</td>
<td>String</td>
<td>time</td>
<td>Label for the filter column.</td>
</tr>
<tr>
<td>legendLabel</td>
<td>String</td>
<td>value</td>
<td>Label for the style description.</td>
</tr>
</table>
<h2 id="Methods">Methods</h2>
<p>
Graph3d supports the following methods.
</p>
<table>
<tr>
<th>Method</th>
<th>Return Type</th>
<th>Description</th>
</tr>
<tr>
<td>animationStart()</td>
<td>none</td>
<td>Start playing the animation.
Only applicable when animation data is available.</td>
</tr>
<tr>
<td>animationStop()</td>
<td>none</td>
<td>Stop playing the animation.
Only applicable when animation data is available.</td>
</tr>
<tr>
<td>getCameraPosition()</td>
<td>An object with parameters <code>horizontal</code>,
<code>vertical</code> and <code>distance</code></td>
<td>Returns an object with parameters <code>horizontal</code>,
<code>vertical</code> and <code>distance</code>,
which each one of them is a number, representing the rotation and position
of the camera.</td>
</tr>
<tr>
<td>redraw()</td>
<td>none</td>
<td>Redraw the graph. Useful after the camera position is changed externally,
when data is changed, or when the layout of the webpage changed.</td>
</tr>
<tr>
<td>setData(data)</td>
<td>none</td>
<td>Replace the data in the Graph3d.</td>
</tr>
<tr>
<td>setOptions(options)</td>
<td>none</td>
<td>Update options of Graph3d.
The provided options will be merged with current options.</td>
</tr>
<tr>
<td>setSize(width, height)</td>
<td>none</td>
<td>Parameters <code>width</code> and <code>height</code> are strings,
containing a new size for the graph. Size can be provided in pixels
or in percentages.</td>
</tr>
<tr>
<td>setCameraPosition (pos)</td>
<td>{horizontal:&nbsp;1.0, vertical:&nbsp;0.5, distance:&nbsp;1.7}</td>
<td>Set the rotation and position of the camera. Parameter <code>pos</code>
is an object which contains three parameters: <code>horizontal</code>,
<code>vertical</code>, and <code>distance</code>.
Parameter <code>horizontal</code> is a value in radians and can have any
value (but normally in the range of 0 and 2*Pi).
Parameter <code>vertical</code> is a value in radians between 0 and 0.5*Pi.
Parameter <code>distance</code> is the (normalized) distance from the
camera to the center of the graph, in the range of 0.71 to 5.0. A
larger distance puts the graph further away, making it smaller.
All parameters are optional.
</td>
</tr>
</table>
<h2 id="Events">Events</h2>
<p>
Graph3d fires events after the camera position has been changed.
The event can be catched by creating a listener.
Here an example on how to catch a <code>cameraPositionChange</code> event.
</p>
<pre class="prettyprint lang-js">
function onCameraPositionChange(event) {
alert('The camera position changed to:\n' +
'Horizontal: ' + event.horizontal + '\n' +
'Vertical: ' + event.vertical + '\n' +
'Distance: ' + event.distance);
}
// assuming var graph3d = new vis.Graph3d(document.getElementById('mygraph'));
graph3d.on('cameraPositionChange', onCameraPositionChange);
</pre>
<p>
The following events are available.
</p>
<table>
<col width="10%">
<col width="60%">
<col width="30%">
<tr>
<th>name</th>
<th>Description</th>
<th>Properties</th>
</tr>
<tr>
<td>cameraPositionChange</td>
<td>The camera position changed. Fired after the user modified the camera position
by moving (dragging) the graph, or by zooming (scrolling),
but not after a call to <code>setCameraPosition</code> method.
The new camera position can be retrieved by calling the method
<code>getCameraPosition</code>.</td>
<td>
<ul>
<li><code>horizontal</code>: Number. The horizontal angle of the camera.</li>
<li><code>vertical</code>: Number. The vertical angle of the camera.</li>
<li><code>distance</code>: Number. The distance of the camera to the center of the graph.</li>
</ul>
</td>
</tr>
</table>
<h2 id="Data_Policy">Data Policy</h2>
<p>
All code and data are processed and rendered in the browser. No data is sent to any server.
</p>
</div>
</body>
</html>

+ 0
- 225
docs/old/index.html View File

@ -1,225 +0,0 @@
<!doctype html>
<html>
<head>
<title>vis.js | documentation</title>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
<link href='css/old_style.css' type='text/css' rel='stylesheet'>
<script type="text/javascript" src="js/prettify/prettify.js"></script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body onload="prettyPrint();">
<div id="container">
<h1>vis.js documentation</h1>
<p>
Vis.js is a dynamic, browser based visualization library.
The library is designed to be easy to use, handle large amounts
of dynamic data, and enable manipulation of the data.
</p>
<p>
The library is developed by
<a href="http://almende.com" target="_blank">Almende B.V.</a>.
Vis.js runs fine on Chrome, Firefox, Opera, Safari, IE9+, and most mobile
browsers (with full touch support).
</p>
<h2 id="Components">Components</h2>
<p>
Vis.js contains of the following components:
</p>
<div style="text-align: center; float: right; padding-left: 30px;">
<a href="img/vis_overview.png" target="_blank">
<img src="img/vis_overview.png" style="width: 350px; "/><br>
(click for a larger view)
</a>
</div>
<ul>
<li>
<a href="dataset.html"><b>DataSet</b></a>.
A flexible key/value based data set.
Add, update, and remove items. Subscribe on changes in the data set.
A DataSet can filter and order items, and convert fields of items.
</li>
<li>
<a href="dataview.html"><b>DataView</b></a>.
A filtered and/or formatted view on a DataSet.
</li>
<li>
<a href="network.html"><b>Network</b></a>.
Display a network (force directed graph) with nodes and edges (previously called Graph).
</li>
<li>
<a href="graph2d.html"><b>Graph2d</b></a>.
Plot data on a timeline with lines or barcharts.
</li>
<li>
<a href="old/graph3d.html"><b>Graph3d</b></a>.
Display data in a three dimensional graph.
</li>
<li>
<a href="timeline.html"><b>Timeline</b></a>.
Display different types of data on a timeline.
</li>
</ul>
<h2 id="Install">Install</h2>
<h3>npm</h3>
<pre class="prettyprint">
npm install vis
</pre>
<h3>bower</h3>
<pre class="prettyprint">
bower install vis
</pre>
<h3>download</h3>
Download the library from the website:
<a href="http://visjs.org" target="_blank">http://visjs.org</a>.
<h2 id="Load">Load</h2>
<p>
To load vis.js, include the javascript and css files of vis in your web page:
</p>
<pre class="prettyprint lang-html">&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;script src="components/vis/vis.js"&gt;&lt;/script&gt;
&lt;link href="components/vis/vis.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;script type="text/javascript"&gt;
// ... load a visualization
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>
or load vis.js using require.js:
</p>
<pre class="prettyprint lang-js">
require.config({
paths: {
vis: 'path/to/vis',
}
});
require(['vis'], function (math) {
// ... load a visualization
});
</pre>
<p>
A timeline can be instantiated as follows. Other components can be
created in a similar way.
</p>
<pre class="prettyprint lang-js">
var timeline = new vis.Timeline(container, data, options);
</pre>
<p>
Where <code>container</code> is an HTML element, <code>data</code> is
an Array with data or a DataSet, and <code>options</code> is an optional
object with configuration options for the component.
</p>
<h2 id="Use">Use</h2>
<p>
A basic example on using a Timeline is shown below. More examples can be
found in the <a href="https://github.com/almende/vis/tree/master/examples"
target="_blank">examples directory</a> of the project.
</p>
<pre class="prettyprint lang-html">
&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Timeline basic demo&lt;/title&gt;
&lt;script src="components/vis/vis.js"&gt;&lt;/script&gt;
&lt;link href="components/vis/vis.css" rel="stylesheet" type="text/css" /&gt;
&lt;style type="text/css"&gt;
body, html {
font-family: sans-serif;
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id="visualization"&gt;&lt;/div&gt;
&lt;script type="text/javascript"&gt;
// DOM element where the Timeline will be attached
var container = document.getElementById('visualization');
// Create a DataSet (allows two way data-binding)
var data = new vis.DataSet([
{id: 1, content: 'item 1', start: '2013-04-20'},
{id: 2, content: 'item 2', start: '2013-04-14'},
{id: 3, content: 'item 3', start: '2013-04-18'},
{id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19'},
{id: 5, content: 'item 5', start: '2013-04-25'},
{id: 6, content: 'item 6', start: '2013-04-27'}
]);
// Configuration for the Timeline
var options = {};
// Create a Timeline
var timeline = new vis.Timeline(container, data, options);
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h2 id="license">License</h2>
<p>
Copyright 2010-2014 Almende B.V.
</p>
<p>
Vis.js is dual licensed under both
</p>
<ul>
<li>
The Apache 2.0 License<br>
<a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>
</li>
</ul>
<p>
and
</p>
<ul>
<li>
The MIT License<br>
<a href="http://opensource.org/licenses/MIT">http://opensource.org/licenses/MIT</a>
</li>
</ul>
<p>
Vis.js may be distributed under either license.
</p>
</div>
</body>
</html>

+ 0
- 2
docs/old/lib/prettify/lang-apollo.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"])

+ 0
- 2
docs/old/lib/prettify/lang-css.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \t\r\n\f]+/,null," \t\r\n\u000c"]],[["str",/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],["str",/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],
["com",/^(?:<!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#(?:[0-9a-f]{3}){1,2}/i],["pln",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],["pun",/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^\)\"\']+/]]),["css-str"])

+ 0
- 2
docs/old/lib/prettify/lang-hs.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/,
null],["pln",/^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],["pun",/^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]]),["hs"])

+ 0
- 2
docs/old/lib/prettify/lang-lisp.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(/,null,"("],["clo",/^\)/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,
null],["lit",/^[+\-]?(?:0x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["cl","el","lisp","scm"])

+ 0
- 2
docs/old/lib/prettify/lang-lua.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],["str",/^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
["pln",/^[a-z_]\w*/i],["pun",/^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]]),["lua"])

+ 0
- 2
docs/old/lib/prettify/lang-ml.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_]\w*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"])

+ 0
- 1
docs/old/lib/prettify/lang-proto.js View File

@ -1 +0,0 @@
PR.registerLangHandler(PR.sourceDecorator({keywords:"bool bytes default double enum extend extensions false fixed32 fixed64 float group import int32 int64 max message option optional package repeated required returns rpc service sfixed32 sfixed64 sint32 sint64 string syntax to true uint32 uint64",cStyleComments:true}),["proto"])

+ 0
- 2
docs/old/lib/prettify/lang-scala.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:(?:""(?:""?(?!")|[^\\"]|\\.)*"{0,3})|(?:[^"\r\n\\]|\\.)*"?))/,null,'"'],["lit",/^`(?:[^\r\n\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&()*+,\-:;<=>?@\[\\\]^{|}~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\r\n\\']|\\(?:'|[^\r\n']+))'/],["lit",/^'[a-zA-Z_$][\w$]*(?!['$\w])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:(?:0(?:[0-7]+|X[0-9A-F]+))L?|(?:(?:0|[1-9][0-9]*)(?:(?:\.[0-9]+)?(?:E[+\-]?[0-9]+)?F?|L?))|\\.[0-9]+(?:E[+\-]?[0-9]+)?F?)/i],["typ",/^[$_]*[A-Z][_$A-Z0-9]*[a-z][\w$]*/],["pln",/^[$a-zA-Z_][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"])

+ 0
- 2
docs/old/lib/prettify/lang-sql.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],["kwd",/^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i,
null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_][\w-]*/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]]),["sql"])

+ 0
- 2
docs/old/lib/prettify/lang-vb.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019][^\r\n\u2028\u2029]*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i,
null],["com",/^REM[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb","vbs"])

+ 0
- 3
docs/old/lib/prettify/lang-vhdl.js View File

@ -1,3 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],["com",/^--[^\r\n]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i],
["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]]),["vhdl","vhd"])

+ 0
- 2
docs/old/lib/prettify/lang-wiki.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t \xA0a-gi-z0-9]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/],["lang-",/^\{\{\{([\s\S]+?)\}\}\}/],["lang-",/^`([^\r\n`]+)`/],["str",/^https?:\/\/[^\/?#\s]*(?:\/[^?#\s]*)?(?:\?[^#\s]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]]),["wiki"]);
PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"])

+ 0
- 2
docs/old/lib/prettify/lang-yaml.js View File

@ -1,2 +0,0 @@
PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:|>?]+/,null,":|>?"],["dec",/^%(?:YAML|TAG)[^#\r\n]+/,null,"%"],["typ",/^[&]\S+/,null,"&"],["typ",/^!\S*/,null,"!"],["str",/^"(?:[^\\"]|\\.)*(?:"|$)/,null,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,null,"'"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^\s+/,null," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\r\n]|$)/],["pun",/^-/],["kwd",/^\w+:[ \r\n]/],["pln",/^\w+/]]),
["yaml","yml"])

+ 0
- 1
docs/old/lib/prettify/prettify.css View File

@ -1 +0,0 @@
.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun{color:#660}.pln{color:#000}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec{color:#606}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}@media print{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun{color:#440}.pln{color:#000}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}

+ 0
- 33
docs/old/lib/prettify/prettify.js View File

@ -1,33 +0,0 @@
window.PR_SHOULD_USE_CONTINUATION=true;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var y=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);y=y?+y[1]:false;window._pr_isIE6=function(){return y};return y};
(function(){function y(b){return b.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;")}function H(b,f,i){switch(b.nodeType){case 1:var o=b.tagName.toLowerCase();f.push("<",o);var l=b.attributes,n=l.length;if(n){if(i){for(var r=[],j=n;--j>=0;)r[j]=l[j];r.sort(function(q,m){return q.name<m.name?-1:q.name===m.name?0:1});l=r}for(j=0;j<n;++j){r=l[j];r.specified&&f.push(" ",r.name.toLowerCase(),'="',r.value.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;").replace(X,"&quot;"),'"')}}f.push(">");
for(l=b.firstChild;l;l=l.nextSibling)H(l,f,i);if(b.firstChild||!/^(?:br|link|img)$/.test(o))f.push("</",o,">");break;case 3:case 4:f.push(y(b.nodeValue));break}}function O(b){function f(c){if(c.charAt(0)!=="\\")return c.charCodeAt(0);switch(c.charAt(1)){case "b":return 8;case "t":return 9;case "n":return 10;case "v":return 11;case "f":return 12;case "r":return 13;case "u":case "x":return parseInt(c.substring(2),16)||c.charCodeAt(1);case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":return parseInt(c.substring(1),
8);default:return c.charCodeAt(1)}}function i(c){if(c<32)return(c<16?"\\x0":"\\x")+c.toString(16);c=String.fromCharCode(c);if(c==="\\"||c==="-"||c==="["||c==="]")c="\\"+c;return c}function o(c){var d=c.substring(1,c.length-1).match(RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));c=[];for(var a=[],k=d[0]==="^",e=k?1:0,h=d.length;e<h;++e){var g=d[e];switch(g){case "\\B":case "\\b":case "\\D":case "\\d":case "\\S":case "\\s":case "\\W":case "\\w":c.push(g);
continue}g=f(g);var s;if(e+2<h&&"-"===d[e+1]){s=f(d[e+2]);e+=2}else s=g;a.push([g,s]);if(!(s<65||g>122)){s<65||g>90||a.push([Math.max(65,g)|32,Math.min(s,90)|32]);s<97||g>122||a.push([Math.max(97,g)&-33,Math.min(s,122)&-33])}}a.sort(function(v,w){return v[0]-w[0]||w[1]-v[1]});d=[];g=[NaN,NaN];for(e=0;e<a.length;++e){h=a[e];if(h[0]<=g[1]+1)g[1]=Math.max(g[1],h[1]);else d.push(g=h)}a=["["];k&&a.push("^");a.push.apply(a,c);for(e=0;e<d.length;++e){h=d[e];a.push(i(h[0]));if(h[1]>h[0]){h[1]+1>h[0]&&a.push("-");
a.push(i(h[1]))}}a.push("]");return a.join("")}function l(c){for(var d=c.source.match(RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),a=d.length,k=[],e=0,h=0;e<a;++e){var g=d[e];if(g==="(")++h;else if("\\"===g.charAt(0))if((g=+g.substring(1))&&g<=h)k[g]=-1}for(e=1;e<k.length;++e)if(-1===k[e])k[e]=++n;for(h=e=0;e<a;++e){g=d[e];if(g==="("){++h;if(k[h]===undefined)d[e]="(?:"}else if("\\"===
g.charAt(0))if((g=+g.substring(1))&&g<=h)d[e]="\\"+k[h]}for(h=e=0;e<a;++e)if("^"===d[e]&&"^"!==d[e+1])d[e]="";if(c.ignoreCase&&r)for(e=0;e<a;++e){g=d[e];c=g.charAt(0);if(g.length>=2&&c==="[")d[e]=o(g);else if(c!=="\\")d[e]=g.replace(/[a-zA-Z]/g,function(s){s=s.charCodeAt(0);return"["+String.fromCharCode(s&-33,s|32)+"]"})}return d.join("")}for(var n=0,r=false,j=false,q=0,m=b.length;q<m;++q){var t=b[q];if(t.ignoreCase)j=true;else if(/[a-z]/i.test(t.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,
""))){r=true;j=false;break}}var p=[];q=0;for(m=b.length;q<m;++q){t=b[q];if(t.global||t.multiline)throw Error(""+t);p.push("(?:"+l(t)+")")}return RegExp(p.join("|"),j?"gi":"g")}function Y(b){var f=0;return function(i){for(var o=null,l=0,n=0,r=i.length;n<r;++n)switch(i.charAt(n)){case "\t":o||(o=[]);o.push(i.substring(l,n));l=b-f%b;for(f+=l;l>=0;l-=16)o.push(" ".substring(0,l));l=n+1;break;case "\n":f=0;break;default:++f}if(!o)return i;o.push(i.substring(l));return o.join("")}}function I(b,
f,i,o){if(f){b={source:f,c:b};i(b);o.push.apply(o,b.d)}}function B(b,f){var i={},o;(function(){for(var r=b.concat(f),j=[],q={},m=0,t=r.length;m<t;++m){var p=r[m],c=p[3];if(c)for(var d=c.length;--d>=0;)i[c.charAt(d)]=p;p=p[1];c=""+p;if(!q.hasOwnProperty(c)){j.push(p);q[c]=null}}j.push(/[\0-\uffff]/);o=O(j)})();var l=f.length;function n(r){for(var j=r.c,q=[j,z],m=0,t=r.source.match(o)||[],p={},c=0,d=t.length;c<d;++c){var a=t[c],k=p[a],e=void 0,h;if(typeof k==="string")h=false;else{var g=i[a.charAt(0)];
if(g){e=a.match(g[1]);k=g[0]}else{for(h=0;h<l;++h){g=f[h];if(e=a.match(g[1])){k=g[0];break}}e||(k=z)}if((h=k.length>=5&&"lang-"===k.substring(0,5))&&!(e&&typeof e[1]==="string")){h=false;k=P}h||(p[a]=k)}g=m;m+=a.length;if(h){h=e[1];var s=a.indexOf(h),v=s+h.length;if(e[2]){v=a.length-e[2].length;s=v-h.length}k=k.substring(5);I(j+g,a.substring(0,s),n,q);I(j+g+s,h,Q(k,h),q);I(j+g+v,a.substring(v),n,q)}else q.push(j+g,k)}r.d=q}return n}function x(b){var f=[],i=[];if(b.tripleQuotedStrings)f.push([A,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
null,"'\""]);else b.multiLineStrings?f.push([A,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):f.push([A,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]);b.verbatimStrings&&i.push([A,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);if(b.hashComments)if(b.cStyleComments){f.push([C,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]);i.push([A,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
null])}else f.push([C,/^#[^\r\n]*/,null,"#"]);if(b.cStyleComments){i.push([C,/^\/\/[^\r\n]*/,null]);i.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}b.regexLiterals&&i.push(["lang-regex",RegExp("^"+Z+"(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);b=b.keywords.replace(/^\s+|\s+$/g,"");b.length&&i.push([R,RegExp("^(?:"+b.replace(/\s+/g,"|")+")\\b"),null]);f.push([z,/^\s+/,null," \r\n\t\u00a0"]);i.push([J,/^@[a-z_$][a-z_$@0-9]*/i,null],[S,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,
null],[z,/^[a-z_$][a-z_$@0-9]*/i,null],[J,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],[E,/^.[^\s\w\.$@\'\"\`\/\#]*/,null]);return B(f,i)}function $(b){function f(D){if(D>r){if(j&&j!==q){n.push("</span>");j=null}if(!j&&q){j=q;n.push('<span class="',j,'">')}var T=y(p(i.substring(r,D))).replace(e?d:c,"$1&#160;");e=k.test(T);n.push(T.replace(a,s));r=D}}var i=b.source,o=b.g,l=b.d,n=[],r=0,j=null,q=null,m=0,t=0,p=Y(window.PR_TAB_WIDTH),c=/([\r\n ]) /g,
d=/(^| ) /gm,a=/\r\n?|\n/g,k=/[ \r\n]$/,e=true,h=window._pr_isIE6();h=h?b.b.tagName==="PRE"?h===6?"&#160;\r\n":h===7?"&#160;<br>\r":"&#160;\r":"&#160;<br />":"<br />";var g=b.b.className.match(/\blinenums\b(?::(\d+))?/),s;if(g){for(var v=[],w=0;w<10;++w)v[w]=h+'</li><li class="L'+w+'">';var F=g[1]&&g[1].length?g[1]-1:0;n.push('<ol class="linenums"><li class="L',F%10,'"');F&&n.push(' value="',F+1,'"');n.push(">");s=function(){var D=v[++F%10];return j?"</span>"+D+'<span class="'+j+'">':D}}else s=h;
for(;;)if(m<o.length?t<l.length?o[m]<=l[t]:true:false){f(o[m]);if(j){n.push("</span>");j=null}n.push(o[m+1]);m+=2}else if(t<l.length){f(l[t]);q=l[t+1];t+=2}else break;f(i.length);j&&n.push("</span>");g&&n.push("</li></ol>");b.a=n.join("")}function u(b,f){for(var i=f.length;--i>=0;){var o=f[i];if(G.hasOwnProperty(o))"console"in window&&console.warn("cannot override language handler %s",o);else G[o]=b}}function Q(b,f){b&&G.hasOwnProperty(b)||(b=/^\s*</.test(f)?"default-markup":"default-code");return G[b]}
function U(b){var f=b.f,i=b.e;b.a=f;try{var o,l=f.match(aa);f=[];var n=0,r=[];if(l)for(var j=0,q=l.length;j<q;++j){var m=l[j];if(m.length>1&&m.charAt(0)==="<"){if(!ba.test(m))if(ca.test(m)){f.push(m.substring(9,m.length-3));n+=m.length-12}else if(da.test(m)){f.push("\n");++n}else if(m.indexOf(V)>=0&&m.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)){var t=m.match(W)[2],p=1,c;c=j+1;a:for(;c<q;++c){var d=l[c].match(W);if(d&&
d[2]===t)if(d[1]==="/"){if(--p===0)break a}else++p}if(c<q){r.push(n,l.slice(j,c+1).join(""));j=c}else r.push(n,m)}else r.push(n,m)}else{var a;p=m;var k=p.indexOf("&");if(k<0)a=p;else{for(--k;(k=p.indexOf("&#",k+1))>=0;){var e=p.indexOf(";",k);if(e>=0){var h=p.substring(k+3,e),g=10;if(h&&h.charAt(0)==="x"){h=h.substring(1);g=16}var s=parseInt(h,g);isNaN(s)||(p=p.substring(0,k)+String.fromCharCode(s)+p.substring(e+1))}}a=p.replace(ea,"<").replace(fa,">").replace(ga,"'").replace(ha,'"').replace(ia," ").replace(ja,
"&")}f.push(a);n+=a.length}}o={source:f.join(""),h:r};var v=o.source;b.source=v;b.c=0;b.g=o.h;Q(i,v)(b);$(b)}catch(w){if("console"in window)console.log(w&&w.stack?w.stack:w)}}var A="str",R="kwd",C="com",S="typ",J="lit",E="pun",z="pln",P="src",V="nocode",Z=function(){for(var b=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=",
"~","break","case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"],f="(?:^^|[+-]",i=0;i<b.length;++i)f+="|"+b[i].replace(/([^=<>:&a-z])/g,"\\$1");f+=")\\s*";return f}(),L=/&/g,M=/</g,N=/>/g,X=/\"/g,ea=/&lt;/g,fa=/&gt;/g,ga=/&apos;/g,ha=/&quot;/g,ja=/&amp;/g,ia=/&nbsp;/g,ka=/[\r\n]/g,K=null,aa=RegExp("[^<]+|<!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<","g"),ba=/^<\!--/,ca=/^<!\[CDATA\[/,da=/^<br\b/i,W=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,
la=x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",
hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true}),G={};u(la,["default-code"]);u(B([],[[z,/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup",
"htm","html","mxml","xhtml","xml","xsl"]);u(B([[z,/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[E,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],
["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);u(B([],[["atv",/^[\s\S]+/]]),["uq.val"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ",
hashComments:true,cStyleComments:true}),["c","cc","cpp","cxx","cyc","m"]);u(x({keywords:"null true false"}),["json"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",
hashComments:true,cStyleComments:true,verbatimStrings:true}),["cs"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
cStyleComments:true}),["java"]);u(x({keywords:"break continue do else for if return while case done elif esac eval fi function in local set then until ",hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);u(x({keywords:"break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);
u(x({keywords:"caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);u(x({keywords:"break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",hashComments:true,
multiLineStrings:true,regexLiterals:true}),["rb"]);u(x({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN ",cStyleComments:true,regexLiterals:true}),["js"]);u(B([],[[A,/^[\s\S]+/]]),
["regex"]);window.PR_normalizedHtml=H;window.prettyPrintOne=function(b,f){var i={f:b,e:f};U(i);return i.a};window.prettyPrint=function(b){function f(){for(var t=window.PR_SHOULD_USE_CONTINUATION?j.now()+250:Infinity;q<o.length&&j.now()<t;q++){var p=o[q];if(p.className&&p.className.indexOf("prettyprint")>=0){var c=p.className.match(/\blang-(\w+)\b/);if(c)c=c[1];for(var d=false,a=p.parentNode;a;a=a.parentNode)if((a.tagName==="pre"||a.tagName==="code"||a.tagName==="xmp")&&a.className&&a.className.indexOf("prettyprint")>=
0){d=true;break}if(!d){a=p;if(null===K){d=document.createElement("PRE");d.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));K=!/</.test(d.innerHTML)}if(K){d=a.innerHTML;if("XMP"===a.tagName)d=y(d);else{a=a;if("PRE"===a.tagName)a=true;else if(ka.test(d)){var k="";if(a.currentStyle)k=a.currentStyle.whiteSpace;else if(window.getComputedStyle)k=window.getComputedStyle(a,null).whiteSpace;a=!k||k==="pre"}else a=true;a||(d=d.replace(/(<br\s*\/?>)[\r\n]+/g,"$1").replace(/(?:[\r\n]+[ \t]*)+/g,
" "))}d=d}else{d=[];for(a=a.firstChild;a;a=a.nextSibling)H(a,d);d=d.join("")}d=d.replace(/(?:\r\n?|\n)$/,"");m={f:d,e:c,b:p};U(m);if(p=m.a){c=m.b;if("XMP"===c.tagName){d=document.createElement("PRE");for(a=0;a<c.attributes.length;++a){k=c.attributes[a];if(k.specified)if(k.name.toLowerCase()==="class")d.className=k.value;else d.setAttribute(k.name,k.value)}d.innerHTML=p;c.parentNode.replaceChild(d,c)}else c.innerHTML=p}}}}if(q<o.length)setTimeout(f,250);else b&&b()}for(var i=[document.getElementsByTagName("pre"),
document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],o=[],l=0;l<i.length;++l)for(var n=0,r=i[l].length;n<r;++n)o.push(i[l][n]);i=null;var j=Date;j.now||(j={now:function(){return(new Date).getTime()}});var q=0,m;f()};window.PR={combinePrefixPatterns:O,createSimpleLexer:B,registerLangHandler:u,sourceDecorator:x,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:C,PR_DECLARATION:"dec",PR_KEYWORD:R,PR_LITERAL:J,PR_NOCODE:V,PR_PLAIN:z,PR_PUNCTUATION:E,PR_SOURCE:P,PR_STRING:A,
PR_TAG:"tag",PR_TYPE:S}})()

+ 0
- 1165
docs/old/old_graph2d.html
File diff suppressed because it is too large
View File


+ 0
- 2625
docs/old/old_network.html
File diff suppressed because it is too large
View File


+ 0
- 210
docs/old/old_network/canvas.html View File

@ -1,210 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" HREF="favicon.ico">
<title>vis.js - A dynamic, browser based visualization library.</title>
<!-- Bootstrap core CSS -->
<link href="../css/bootstrap.css" rel="stylesheet">
<link href="../css/newdocs.css" rel="stylesheet">
<link href="../css/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/toggleTable.js"></script>
<script type="text/javascript" src="../js/googleAnalytics.js"></script>
<script type="text/javascript" src="../js/prettify/prettify.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../js/smooth-scroll.min.js"></script>
<script language="JavaScript">
smoothScroll.init();
</script>
</head>
<!-- NAVBAR
================================================== -->
<body onload="prettyPrint();">
<div class="navbar-wrapper">
<div class="container">
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="../index.html#modules">Modules</a></li>
<li><a href="../blog.html">Blog</a></li>
<li><a href="../index.html#download_install">Download</a></li>
<li><a href="../showcase/index.html">Showcase</a></li>
<li><a href="../index.html#contribute">Contribute</a></li>
<li><a href="../index.html#licenses">License</a></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
<a href="https://github.com/almende/vis" class="hidden-xs hidden-sm hidden-md"><img
style="position: absolute; top: 0; right: 0; border: 0;"
src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<div class="container full">
<h1>Network - canvas</h1>
<p>Handles the HTML part of the canvas.</p>
<h3>Options</h3>
<p>The options for the canvas have to be contained in an object titled 'canvas'.</p>
<p>Click on the options shown to show how these options are supposed to be used.</p>
<ul class="nav nav-tabs">
<li role="presentation" class="active" onclick="hideOptions('fullTab','fullOptions');" id="hiddenTab"><a href="#">options hidden</a></li>
<li role="presentation" onclick="toggleTab('fullTab','fullOptions');" id="fullTab"><a href="#">options shown</a></li>
</ul>
<br>
<pre class="prettyprint lang-js options hidden" id="fullOptions">
var options = {
canvas:{
width:'100%', // other format: '400px'
height:'100%',
autoResize: true
}
}
network.setOptions(options);
</pre>
<p>All of the individual options are explained here:</p>
<table>
<tr class="header">
<td class="name">name</td>
<td class="type">type</td>
<td class="default">default</td>
<td class="description">description</td>
</tr>
<tr>
<td>width</td>
<td class="mid">String</td>
<td class="mid"><code>'100%'</code></td>
<td>the width of the canvas. Can be in percentages or pixels (ie. <code>'400px'</code>).</td>
</tr>
<tr>
<td>height</td>
<td class="mid">String</td>
<td class="mid"><code>'100%'</code></td>
<td>the height of the canvas. Can be in percentages or pixels (ie. <code>'400px'</code>).</td>
</tr>
<tr>
<td>autoResize</td>
<td class="mid">Boolean</td>
<td class="mid"><code>true</code></td>
<td>If true, the Network will automatically detect when its container is resized, and redraw itself
accordingly. If false, the Network can be forced to repaint after its container has been resized
using the function redraw() and setSize().</td>
</tr>
</table>
<h3>Methods</h3>
<p>This is a list of all the methods in the public API. Options can be set directly to the module or you can use the
setOptions method of the network itself and use the module name as an object name.</p>
<table>
<tr class="header">
<td class="methodName">name</td>
<td>returns</td>
<td>description</td>
</tr>
<tr>
<td>setSize(<br>&nbsp;&nbsp;&nbsp;<code><i>String width</i></code>,<br>&nbsp;&nbsp;&nbsp;<code><i>String
height</i></code><br>)
</td>
<td class="mid">none</td>
<td>Set the size of the canvas. This is automatically done on a window resize.</td>
</tr>
<tr>
<td>canvasToDOM({<br>&nbsp;&nbsp;&nbsp;<code><i>x: Number</i></code>,<br>&nbsp;&nbsp;&nbsp;<code><i>y:
Number</i></code><br>})
</td>
<td class="mid">Object</td>
<td>This function converts canvas coordinates to coordinates on the DOM. Input and output are in the form of
<code>{x:Number,y:Number}</code>. The DOM values are relative to the network container.
</td>
</tr>
<tr>
<td>DOMtoCanvas({<br>&nbsp;&nbsp;&nbsp;<code><i>x: Number</i></code>,<br>&nbsp;&nbsp;&nbsp;<code><i>y:
Number</i></code><br>})
</td>
<td class="mid">Object</td>
<td>This function converts DOM coordinates to coordinates on the canvas. Input and output are in the form of
<code>{x:Number,y:Number}</code>. The DOM values are relative to the network container.
</td>
</tr>
</table>
<h3>Events</h3>
<p>This is a list of all the events in the public API. They are collected here from all individual modules.</p>
<table>
<tr class="header">
<td class="eventName">name</td>
<td class="eventProperties">properties</td>
<td>description</td>
</tr>
<tr>
<td>resize</td>
<td class="mid">
<pre class="code">
{
width: Number // the new width of the canvas
height: Number // the new height of the canvas
oldWidth: Number // the old width of the canvas
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 values.
</td>
</tr>
</table>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>

+ 0
- 181
docs/old/old_network/clustering.html View File

@ -1,181 +0,0 @@
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" HREF="favicon.ico">
<title>vis.js - A dynamic, browser based visualization library.</title>
<!-- Bootstrap core CSS -->
<link href="../css/bootstrap.css" rel="stylesheet">
<link href="../css/newdocs.css" rel="stylesheet">
<link href="../css/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/googleAnalytics.js"></script>
<script type="text/javascript" src="../js/prettify/prettify.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="../js/smooth-scroll.min.js"></script>
<script language="JavaScript">
smoothScroll.init();
</script>
<style>
td.properties {
width:350px;
}
td.name {
width:180px;
}
</style>
</head>
<!-- NAVBAR
================================================== -->
<body onload="prettyPrint();">
<div class="navbar-wrapper">
<div class="container">
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="../index.html#modules">Modules</a></li>
<li><a href="../blog.html">Blog</a></li>
<li><a href="../index.html#download_install">Download</a></li>
<li><a href="../showcase/index.html">Showcase</a></li>
<li><a href="../index.html#contribute">Contribute</a></li>
<li><a href="../index.html#licenses">License</a></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
<a href="https://github.com/almende/vis" class="hidden-xs hidden-sm hidden-md"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<div class="container full">
<h1>Network - clustering</h1>
<p>Handles the HTML part of the canvas.</p>
<h3>Options</h3>
<p>Clustering has no options, everything is done with methods.</p>
<h3>Methods</h3>
<p>This is a list of all the methods in the public API. Options can be set directly to the module or you can use the setOptions method of the network itself and use the module name as an object name.</p>
<table>
<tr class="header"><td class="name">name</td><td>returns</td><td>description</td></tr>
<tr><td>findNode(<br>
&nbsp;&nbsp;<code>String nodeId</code><br>)</td> <td class="mid">Array</td> <td>Nodes can be in clusters. Clusters can also be in clusters. This function returns and array of nodeIds showing where the node is. Example: <br>
cluster 'A' contains cluster 'B',<br>
cluster 'B' contains cluster 'C',<br>
cluster 'C' contains node 'fred'.<br>
<code>network.clustering.findNode('fred')</code> will return <code>['A','B','C','fred']</code>.
</td></tr>
<tr><td>isCluster(<br>
&nbsp;&nbsp;<code>String nodeId</code><br>)</td> <td class="mid">Boolean</td> <td>Returns true if the node whose ID has been supplied is a cluster.</td></tr>
<tr><td>openCluster(<br>&nbsp;&nbsp;
<code>String nodeId</code><br>)</td> <td class="mid">none</td> <td>Opens the cluster, releases the contained nodes and edges, removing the cluster node and cluster edges.</td></tr>
<tr><td>cluster(<br>&nbsp;&nbsp;
<code>Object options</code><br>)</td> <td class="mid">none</td> <td>The options object is explained in full <a data-scroll="" data-options="{ &quot;easing&quot;: &quot;easeInCubic&quot; }" href="#optionsObject">below</a>. The joinCondition function is presented with all nodes.</td></tr>
<tr><td>clusterByConnection(<br>
&nbsp;&nbsp;<code>String nodeId</code>,<br>
&nbsp;&nbsp;<code>[Object options]</code><br>
)</td> <td class="mid">none</td> <td>This method looks at the provided node and makes a cluster of it and all it's connected nodes. The behaviour can be customized by proving the options object. All options of this object are explained <a data-scroll="" data-options="{ &quot;easing&quot;: &quot;easeInCubic&quot; }" href="#optionsObject">below</a>. The joinCondition is only presented with the connected nodes.</td></tr>
<tr><td>clusterByHubsize(<br>
&nbsp;&nbsp;<code>Number hubsize</code>,<br>
&nbsp;&nbsp;<code>[Object options]</code><br>)</td><td class="mid">none</td> <td>This method checks all nodes in the network and those with a equal or higher amount of edges than specified with the <code>hubsize</code> qualify. Cluster by connection is performed on each of them. The options object is described for <code>clusterByConnection</code> and does the same here.</td></tr>
<tr><td>clusterOutliers(<br>
&nbsp;&nbsp;<code>[Object options]</code><br>)</td><td class="mid">none</td> <td>This method will cluster all nodes with 1 edge with their respective connected node.</td></tr>
</table>
<br>
<h4 id="optionsObject">Cluster options object</h4>
<p>The options object supplied to the cluster functions can contain these properties:</p>
<table>
<tr class="header"><td class="name">name</td><td>Type</td><td>description</td></tr>
<tr><td>joinCondition(<br>&nbsp;&nbsp;<code>Object nodeOptions</code><br>)</td> <td class="mid">Function</td>
<td><i>Optional for all but the cluster method. </i> The cluster module loops over all nodes that are selected to be in the cluster and calls this function with their data as argument.
If this function returns true, this node will be added to the cluster. You have access to all options (including the default)
as well as any custom fields you may have added to the node to determine whether or not to include it in the cluster. Example:
<pre class="prettyprint lang-js">
var nodes = [
{id: 4, label: 'Node 4'},
{id: 5, label: 'Node 5'},
{id: 6, label: 'Node 6', cid:1},
{id: 7, label: 'Node 7', cid:1}
]
var options = {
joinCondition:function(nodeOptions) {
return nodeOptions.cid === 1;
}
}
network.clustering.cluster(options);
</pre></td></tr>
<tr><td>processProperties(<br>&nbsp;&nbsp;<code>Object nodeOptions</code><br>)</td> <td class="mid">Function</td> <td><i>Optional. </i> Before creating the new cluster node, this (optional) function will be called with the properties supplied by you (<code>clusterNodeProperties</code>), all contained nodes and all contained edges. You can use this to update the
properties of the cluster based on which items it contains. The function should return the properties to create the cluster node. In the example below, we ensure preservation of mass and value when forming the cluster:
<pre class="prettyprint lang-js">
var options = {
processProperties: function (clusterOptions, childNodes, childEdges) {
var totalMass = 0;
var totalValue = 0;
for (var i = 0; i < childNodes.length; i++) {
totalMass += childNodes[i].mass;
totalValue = childNodes[i].value ? totalValue + childNodes[i].value : totalValue;
}
clusterOptions.mass = totalMass;
if (totalValue > 0) {
clusterOptions.value = totalValue;
}
return clusterOptions;
},
}
</pre></td></tr>
<tr><td>clusterNodeProperties</td> <td class="mid">Object</td> <td><i>Optional. </i> This is an object containing the options for the cluster node. All options described in the <a href="./nodes.html">nodes module</a> are allowed. This allows you to style your cluster node any way you want. This is also the style object that is provided in the processProperties function for fine tuning. If undefined, default node options will be used.</td></tr>
<tr><td>clusterEdgeProperties</td> <td class="mid">Object</td> <td><i>Optional. </i> This is an object containing the options for the edges connected to the cluster. All options described in the <a href="./edges.html">edges module</a> are allowed. Using this, you can style the edges connecting to the cluster any way you want. If none are provided, the optoins from the edges that are replaced are used. If undefined, default edge options will be used.</td></tr>
</table>
<p>
</p>
<br><br>
<h3>Events</h3>
<p>The clustering module does not have any events.</p>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>

+ 0
- 126
docs/old/old_network/rendering.html View File

@ -1,126 +0,0 @@
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" HREF="favicon.ico">
<title>vis.js - A dynamic, browser based visualization library.</title>
<!-- Bootstrap core CSS -->
<link href="../css/bootstrap.css" rel="stylesheet">
<link href="../css/newdocs.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="../css/prettify.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="../js/googleAnalytics.js"></script>
<script type="text/javascript" src="../js/prettify/prettify.js"></script>
<script src="../js/smooth-scroll.min.js"></script>
<script language="JavaScript">
smoothScroll.init();
</script>
<script type="text/javascript" src="../js/toggleTable.js"></script>
</head>
<body onload="prettyPrint();">
<div class="navbar-wrapper">
<div class="container">
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="http://www.visjs.org/index.html#modules">Modules</a></li>
<li><a href="http://www.visjs.org/blog.html">Blog</a></li>
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
<a href="https://github.com/almende/vis" class="hidden-xs hidden-sm hidden-md"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<div class="container full">
<h1>Network - rendering</h1>
<p>Handles the rendering aspect of vis. It governs the render loop, it draws the nodes and edges and provides events to allow users to hook into the drawing.</p>
<h3>Options</h3>
<p>The options for the rendering have to be contained in an object titled 'rendering'.</p>
<p>Click on the options shown to show how these options are supposed to be used.</p>
<ul class="nav nav-tabs">
<li role="presentation" class="active" onclick="hideOptions('fullTab','fullOptions');" id="hiddenTab"><a href="#">options hidden</a></li>
<li role="presentation" onclick="toggleTab('fullTab','fullOptions');" id="fullTab"><a href="#">options shown</a></li>
</ul>
<br>
<pre class="prettyprint lang-js options hidden" id="fullOptions">
var options = {
rendering:{
hideEdgesOnDrag: true,
hideNodesOnDrag: false
}
}
network.setOptions(options);
</pre>
<p>All of the individual options are explained here:</p>
<table>
<tr class="header"><td>name</td><td>type</td><td>default</td><td>description</td></tr>
<tr><td>hideEdgesOnDrag</td><td class="mid">Boolean</td><td class="mid"><code>false</code></td><td>When true, the edges are not drawn when dragging the view. This can greatly speed up responsiveness on dragging, improving user experience.</td></tr>
<tr><td>hideNodesOnDrag</td><td class="mid">Boolean</td><td class="mid"><code>false</code></td><td>When true, the nodes are not drawn when dragging the view. This can greatly speed up responsiveness on dragging, improving user experience.</td></tr>
</table>
<h3>Methods</h3>
<p>This is a list of all the methods in the public API. Options can be set directly to the module or you can use the setOptions method of the network itself and use the module name as an object name.</p>
<table>
<tr class="header"><td>name</td><td>returns</td><td>description</td></tr>
<tr><td>redraw()</td><td class="mid">none</td><td>Redraw the network.</td></tr>
</table>
<h3>Events</h3>
<p>These events are fired by the renderer and can be used to move and draw custom elements on the same canvas as the rest of the network.</p>
<table>
<tr class="header"><td>name</td><td class="properties">properties</td><td>description</td></tr>
<tr><td>initRedraw</td><td class="mid">none</td><td>Fired before the redrawing begins. The simulation step has completed at this point. Can be used to move custom elements before starting drawing the new frame.</td>
<tr><td>beforeDrawing</td><td class="mid"><code>canvas context</code></td><td>Fired after the canvas has been cleared, scaled and translated to the viewing position but before all edges and nodes are drawn. Can be used to draw behind the network.</td>
<tr><td>initRedraw</td><td class="mid"><code>canvas context</code></td><td>Fired after drawing on the canvas has been completed. Can be used to draw on top of the network.</td></tr>
</table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>

+ 0
- 134
docs/old/old_network/selection.html View File

@ -1,134 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" HREF="favicon.ico">
<title>vis.js - A dynamic, browser based visualization library.</title>
<!-- Bootstrap core CSS -->
<link href="../css/bootstrap.css" rel="stylesheet">
<link href="../css/newdocs.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="../css/prettify.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="../js/googleAnalytics.js"></script>
<script type="text/javascript" src="../js/prettify/prettify.js"></script>
<script src="../js/smooth-scroll.min.js"></script>
<script language="JavaScript">
smoothScroll.init();
</script>
<script type="text/javascript" src="../js/toggleTable.js"></script>
</head>
<body onload="prettyPrint();">
<div class="navbar-wrapper">
<div class="container">
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="http://www.visjs.org/index.html#modules">Modules</a></li>
<li><a href="http://www.visjs.org/blog.html">Blog</a></li>
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
<a href="https://github.com/almende/vis" class="hidden-xs hidden-sm hidden-md"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<div class="container full">
<h1>Network - selection</h1>
<p>Handles the selection of nodes and edges.</p>
<h3>Options</h3>
<p>The options for the selection have to be contained in an object titled 'selection'.</p>
<p>Click on the options shown to show how these options are supposed to be used.</p>
<ul class="nav nav-tabs">
<li role="presentation" class="active" onclick="hideOptions('fullTab','fullOptions');" id="hiddenTab"><a href="#">options hidden</a></li>
<li role="presentation" onclick="toggleTab('fullTab','fullOptions');" id="fullTab"><a href="#">options shown</a></li>
</ul>
<br>
<pre class="prettyprint lang-js options hidden" id="fullOptions">
var options = {
selection:{
selectable: true,
selectConnectedEdges: false
}
}
network.setOptions(options);
</pre>
<p>All of the individual options are explained here:</p>
<table>
<tr class="header"><td>name</td><td>type</td><td>default</td><td>description</td></tr>
<tr><td>selectable</td> <td class="mid">Boolean</td><td class="mid"><code>true</code></td><td>When true, the nodes and edges can be selected by the user.</td></tr>
<tr><td>selectConnectedEdges</td> <td class="mid">Boolean</td><td class="mid"><code>true</code></td><td>When true, on selecting a node, its connecting edges are highlighted.</td></tr>
</table>
<h3>Methods</h3>
<p>This is a list of all the methods in the public API. Options can be set directly to the module or you can use the setOptions method of the network itself and use the module name as an object name.</p>
<table>
<tr class="header"><td class="methodName">name</td><td>returns</td><td>description</td></tr>
<tr><td>getSelection()</td> <td class="mid">
<pre class="code">
{
nodes: [Array of selected nodeIds],
edges: [Array of selected edgeIds]
}</pre> </td><td>Returns an object with selected nodes and edges ids.</td></tr>
<tr><td>getSelectedNodes()</td> <td class="mid"><code>[nodeId1, nodeId2, ..]</code></td><td>Returns an array of selected node ids.</td></tr>
<tr><td>getSelectedEdges()</td> <td class="mid"><code>[edgeId1, edgeId2, ..]</code></td><td>Returns an array of selected edge ids.</td></tr>
<tr><td>getNodeAt(<br>&nbsp;&nbsp;&nbsp;<code><i>{x: xPosition DOM,<br>&nbsp;&nbsp; y: yPosition DOM}</i></code><br>)</td> <td class="mid">nodeId</td><td>Returns a nodeId or undefined. The DOM positions are expected to be in pixels from the top left corner of the canvas.</td></tr>
<tr><td>getEdgeAt(<br>&nbsp;&nbsp;&nbsp;<code><i>{x: xPosition DOM,<br>&nbsp;&nbsp; y: yPosition DOM}</i></code><br>)</td> <td class="mid">edgeId</code></td><td>Returns a edgeId or undefined. The DOM positions are expected to be in pixels from the top left corner of the canvas..</td></tr>
<tr><td>selectNodes(<br>&nbsp;&nbsp;&nbsp;<code><i>Array with nodeIds</i></code>,<br>&nbsp;&nbsp;&nbsp;<code><i>[Boolean highlightEdges]</i></code><br>)</td> <td class="mid">none</td><td>Selects the nodes corresponding to the id's in the input array. If highlightEdges is true or undefined, the neighbouring edges will also be selected. This method unselects all other objects before selecting its own objects. <i>Does not fire events</i>.</td></tr>
<tr><td>selectEdges(<br>&nbsp;&nbsp;&nbsp;<code><i>Array with edgeIds</i></code><br>)</td> <td class="mid">none</td><td>Selects the edges corresponding to the id's in the input array. This method unselects all other objects before selecting its own objects. <i>Does not fire events</i>.</td></tr>
<tr><td>unselectAll()</td> <td class="mid">none</td> <td>Unselect all objects. <i>Does not fire events</i>.</td></tr>
</table>
<h3>Events</h3>
<p>The selection handler does not fire events. All related events are fired by the <a href="./interaction.html">interaction module</a> because they are triggered by user interaction.</p>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>

+ 0
- 159
docs/old/old_network/view.html View File

@ -1,159 +0,0 @@
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" HREF="favicon.ico">
<title>vis.js - A dynamic, browser based visualization library.</title>
<!-- Bootstrap core CSS -->
<link href="../css/bootstrap.css" rel="stylesheet">
<link href="../css/newdocs.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="../css/prettify.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="../js/googleAnalytics.js"></script>
<script type="text/javascript" src="../js/prettify/prettify.js"></script>
<script src="../js/smooth-scroll.min.js"></script>
<script language="JavaScript">
smoothScroll.init();
</script>
<script type="text/javascript" src="../js/toggleTable.js"></script>
</head>
<body onload="prettyPrint();">
<div class="navbar-wrapper">
<div class="container">
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="http://www.visjs.org/index.html#modules">Modules</a></li>
<li><a href="http://www.visjs.org/blog.html">Blog</a></li>
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
<a href="https://github.com/almende/vis" class="hidden-xs hidden-sm hidden-md"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<div class="container full">
<h1>Network - view</h1>
<p>Acts as the camera that looks on the canvas. Does the animation, zooming and focusing.</p>
<h3>Options</h3>
<p>The view has no options.</p>
<h3>Methods</h3>
<p>This is a list of all the methods in the public API. Options can be set directly to the module or you can use the setOptions method of the network itself and use the module name as an object name.</p>
<table>
<tr class="header"><td class="methodName">name</td><td>returns</td><td>description</td></tr>
<tr><td>getScale()</td> <td class="mid">Number</td><td>Returns the current scale of the network. 1.0 is comparible to 100%, 0 is zoomed out infinitely.</td></tr>
<tr><td>getPosition()</td> <td class="mid">Number</td><td>Returns the current central focus point of the camera.</td></tr>
<tr><td>fit(<code>[Object options]</code>)</td><td class="mid">none</td><td>Zooms out so all nodes fit on the canvas. You can supply options to customize this:
<pre class="code">
{
nodes:[Array of nodeIds],
animation: { // -------------------> can be a boolean too!
duration: Number
easingFunction: String
}
}
</pre>
The nodes can be used to zoom to fit only specific nodes in the view. <br /><br />
The other options are explained in the <code>moveTo()</code> description below.
All options are optional for the fit method.
</td></tr>
<tr><td>focus(<br>
&nbsp;&nbsp;&nbsp;<code>String nodeId</code>,<br>
&nbsp;&nbsp;&nbsp;<code>[Object options]</code><br>)</td><td class="mid">none</td>
<td>You can focus on a node with this function. What that means is the view will lock onto that node, if it is moving, the view will also move accordingly. If the view is dragged by the user, the focus is broken.
You can supply options to customize the effect:
<pre class="code">
{
scale: Number,
offset: {x:Number, y:Number}
locked: boolean
animation: { // -------------------> can be a boolean too!
duration: Number
easingFunction: String
}
}
</pre>
All options except for locked are explained in the <code>moveTo()</code> description below. Locked denotes whether or not the view remains locked to the node once the zoom-in animation is finished. Default value is true. The options object is optional in the focus method.</td></tr>
<tr><td>moveTo(<code>Object options</code>)</td> <td class="mid">none</td><td>You can animate or move the camera using the moveTo method. Options are:
<pre class="code">
{
position: {x:Number, y:Number},
scale: Number,
offset: {x:Number, y:Number}
animation: { // -------------------> can be a boolean too!
duration: Number
easingFunction: String
}
}
</pre>
The position (in canvas units!) is the position of the central focus point of the camera. <br><br>
The scale is the target zoomlevel. Default value is 1.0. <br><br>
The offset (in DOM units) is how many pixels from the center the view is focussed. Default value is {x:0,y:0}.<br><br>
For animation you can either use a Boolean to use it with the default options or disable it or you can define the duration (in milliseconds) and easing function manually. Available are:
<code>linear, easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic, easeInOutCubic, easeInQuart, easeOutQuart, easeInOutQuart, easeInQuint, easeOutQuint, easeInOutQuint</code>. <br><br>
<i>You will have to define at least a scale or a position. Otherwise, there is nothing to move to.</i>
</td></tr>
<tr><td>releaseNode()</td><td class="mid">none</td><td>Programatically release the focussed node.</td></tr>
</table>
<h3>Events</h3>
<p>These events are fired by the renderer and can be used to move and draw custom elements on the same canvas as the rest of the network.</p>
<table>
<tr class="header"><td>name</td><td class="properties">properties</td><td>description</td></tr>
<tr><td>animationFinished</td><td class="mid">none</td><td>Fired when an animation is finished.</td>
</table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>

+ 0
- 1510
docs/old/old_timeline.html
File diff suppressed because it is too large
View File


+ 122
- 23
docs/timeline/index.html View File

@ -64,6 +64,7 @@
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
</div>
@ -161,8 +162,8 @@
<h2 id="Loading">Loading</h2>
<p>
Install or download the <a href="http://visjs.org" target="_blank">vis.js</a> library.
in a subfolder of your project. Include the libraries script and css files in the
Install or download the <a href="http://visjs.org" target="_blank">vis.js</a> library
in a subfolder of your project. Include the library's script and css files in the
head of your html code:
</p>
@ -556,7 +557,7 @@ function (option, path) {
<tr>
<td>format</td>
<td>Object</td>
<td>Object or Function</td>
<td>none</td>
<td>
Apply custom date formatting of the labels on the time axis. The default value of <code>format</code> is:
@ -582,8 +583,16 @@ function (option, path) {
year: ''
}
}</pre>
For values which not provided in the customized <code>options.format</code>, the default values will be used.
All available formatting syntax is described in the <a href="http://momentjs.com/docs/#/displaying/format/">docs of moment.js</a>.
<br>
You can also use a function format for each label. The function accepts as arguments the date, scale and step in that order, and expects to return a string for the label.
<pre class="prettyprint lang-js">function format({
minorLabels: Function(date: Date, scale: Number, step: Number),
majorLabels: Function(date: Date, scale: Number, step: Number)
}</pre>
</td>
</tr>
@ -639,7 +648,7 @@ function (option, path) {
<td>groupTemplate</td>
<td>function</td>
<td>none</td>
<td>A template function used to generate the contents of the groups. The function is called by the Timeline with a groups data as argument, and must return HTML code as result. When the option groupTemplate is specified, the groups do not need to have a field <code>content</code>. See section <a href="#Templates">Templates</a> for a detailed explanation.</td>
<td>A template function used to generate the contents of the groups. The function is called by the Timeline with a groups data as the first argument and the group element as the second, and must return HTML code as result. When the option groupTemplate is specified, the groups do not need to have a field <code>content</code>. See section <a href="#Templates">Templates</a> for a detailed explanation.</td>
</tr>
<tr>
@ -666,6 +675,15 @@ function (option, path) {
</td>
</tr>
<tr>
<td>horizontalScroll</td>
<td>Boolean</td>
<td>false</td>
<td>This option allows you to scroll horizontally to move backwards and forwards in the time range.
Only applicable when option <code>zoomCtrl</code> is defined or <code>zoomable</code> is <code>false</code>. Notice that defining this option as <code>true</code> will override <code>verticalScroll</code> scroll event but not eliminate the vertical scrollbar.
</td>
</tr>
<tr>
<td>itemsAlwaysDraggable</td>
<td>boolean</td>
@ -894,6 +912,12 @@ function (option, path) {
<td>Orientation of the timeline items: 'top' or 'bottom' (default). Determines whether items are aligned to the top or bottom of the Timeline.</td>
</tr>
<tr>
<td>rtl</td>
<td>boolean</td>
<td><code>false</code></td>
<td>If true, the timeline will be right-to-left. Note: you can achieve rtl timeline by defining a parent node with <code>dir="rtl"</code>. The timeline knows to take the nearest parent node direction and apply it. Notice that the timeline will prefer the <code>option.rtl</code> over any parent <code>dir="rtl"</code></td>
</tr>
<tr>
<td>selectable</td>
@ -963,14 +987,7 @@ function (option, path) {
<td>template</td>
<td>function</td>
<td>none</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 <a href="#Templates">Templates</a> for a detailed explanation.</td>
</tr>
<tr>
<td>throttleRedraw</td>
<td>number</td>
<td><code>0</code></td>
<td>Limit the maximum number of redraws to once every x milliseconds. For example setting throttleRedraw to `100` milliseconds will limit the number of redraws to 10 times per second.</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 the first argument and the item element as the second, 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 <a href="#Templates">Templates</a> for a detailed explanation.</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','timeAxis', this);">
@ -1007,6 +1024,27 @@ function (option, path) {
</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','tooltipOnItemUpdateTime', this);">
<td><span parent="tooltipOnItemUpdateTime" class="right-caret"></span> tooltipOnItemUpdateTime</td>
<td>Object/Boolean</td>
<td><code>false</code></td>
<td>Show a tooltip on updating an item's time. Note: <code>editable.updateTime</code> must be <code>true</code></td>
</tr>
<tr parent="tooltipOnItemUpdateTime" class="hidden">
<td class="indent">template</td>
<td>Function</td>
<td>none</td>
<td>A template function used to generate the contents of the tooltip. The function is called by the Timeline with an item data as the first argument, and must return HTML code as result. See section <a href="#Templates">Templates</a> for a detailed explanation.
</td>
</tr>
<tr>
<td>verticalScroll</td>
<td>Boolean</td>
<td><code>false</code></td>
<td> Show a vertical scroll on the side of the group list and link it to the scroll event when zoom is not triggered. Notice that defining this option as <code>true</code> will NOT override <code>horizontalScroll</code>. The scroll event will be vertically ignored, but a vertical scrollbar will be visible
</td>
</tr>
<tr>
<td>width</td>
<td>String or Number</td>
@ -1186,7 +1224,7 @@ document.getElementById('myTimeline').onclick = function (event) {
<tr>
<td>on(event, callback)</td>
<td>none</td>
<td>Create an event listener. The callback function is invoked every time the event is triggered. Avialable events: <code>rangechange</code>, <code>rangechanged</code>, <code>select</code>. The callback function is invoked as <code>callback(properties)</code>, where <code>properties</code> is an object containing event specific properties. See section <a href="#Events">Events for more information</a>.</td>
<td>Create an event listener. The callback function is invoked every time the event is triggered. Available events: <code>rangechange</code>, <code>rangechanged</code>, <code>select</code>, <code>itemover</code>, <code>itemout</code>. The callback function is invoked as <code>callback(properties)</code>, where <code>properties</code> is an object containing event specific properties. See section <a href="#Events">Events for more information</a>.</td>
</tr>
<tr>
@ -1225,7 +1263,7 @@ document.getElementById('myTimeline').onclick = function (event) {
<td>none</td>
<td>Adjust the time of a custom time bar.
Parameter <code>time</code> can be a Date object, numeric timestamp, or ISO date string.
Parameter <code>id</code> is the idof the custom time bar, and is <code>undefined</code> by default.
Parameter <code>id</code> is the id of the custom time bar, and is <code>undefined</code> by default.
</td>
</tr>
@ -1297,9 +1335,20 @@ document.getElementById('myTimeline').onclick = function (event) {
</td>
</tr>
</table>
<tr>
<td>zoomIn(percentage)</td>
<td>none</td>
<td>Zoom in the current visible window. The parameter <code>percentage</code> can be a <code>Number</code> and must be between 0 and 1. If the parameter value of <code>percentage</code> is null, the window will be left unchanged.
</td>
</tr>
<tr>
<td>zoomOut(percentage)</td>
<td>none</td>
<td>Zoom out the current visible window. The parameter <code>percentage</code> can be a <code>Number</code> and must be between 0 and 1. If the parameter value of <code>percentage</code> is null, the window will be left unchanged.
</td>
</tr>
</table>
<h2 id="Events">Events</h2>
<p>
@ -1313,7 +1362,7 @@ document.getElementById('myTimeline').onclick = function (event) {
<pre class="prettyprint lang-js">
timeline.on('select', function (properties) {
alert('selected items: ' + properties.nodes);
alert('selected items: ' + properties.items);
});
</pre>
@ -1323,7 +1372,7 @@ timeline.on('select', function (properties) {
<pre class="prettyprint lang-js">
function onSelect (properties) {
alert('selected items: ' + properties.nodes);
alert('selected items: ' + properties.items);
}
// add event listener
@ -1441,6 +1490,28 @@ timeline.off('select', onSelect);
</td>
</tr>
<tr>
<td>itemover</td>
<td>
<ul>
<li><code>item</code>: hovered item id</li>
<li><code>event</code>: the original mouseover event</li>
</ul>
</td>
<td>Fired when the user moves the mouse over an item.</td>
</tr>
<tr>
<td>itemout</td>
<td>
<ul>
<li><code>item</code>: hovered item id</li>
<li><code>event</code>: the original mouseout event</li>
</ul>
</td>
<td>Fired when the user moves the mouse out of an item.</td>
</tr>
<tr>
<td>timechange</td>
<td>
@ -1527,7 +1598,9 @@ var items = new vis.DataSet([
</p>
<ul>
<li><code>item</code>: the item being manipulated</li>
<li><code>callback</code>: a callback function which must be invoked to report back. The callback must be invoked as <code>callback(item or null)</code>. Here, <code>item</code> can contain changes to the passed item. Parameter `item` typically contains fields `content`, `start`, and optionally `end`. The type of `start` and `end` is determined by the DataSet type configuration and is `Date` by default. When invoked as <code>callback(null)</code>, the action will be cancelled.</li>
<li><code>callback</code>: a callback function which must be invoked to report back. The callback must be invoked as <code>callback(item)</code> or <code>callback(null)</code>.
Here, <code>item</code> can contain changes to the passed item. Parameter <code>item</code> typically contains fields `content`, `start`, and optionally `end`. The type of `start`
and `end` is determined by the DataSet type configuration and is `Date` by default. When invoked as <code>callback(null)</code>, the action will be cancelled.</li>
</ul>
<p>
@ -1553,7 +1626,7 @@ var items = new vis.DataSet([
<h2 id="Templates">Templates</h2>
<p>
Timeline supports templates to format item contents. Any template engine (such as <a href="http://handlebarsjs.com/">handlebars</a> or <a href="http://mustache.github.io/">mustache</a>) can be used, and one can also manually build HTML. In the options, one can provide a template handler. This handler is a function accepting an items data as argument, and outputs formatted HTML:
Timeline supports templates to format item contents. Any template engine (such as <a href="http://handlebarsjs.com/">handlebars</a> or <a href="http://mustache.github.io/">mustache</a>) can be used, and one can also manually build HTML. In the options, one can provide a template handler. This handler is a function accepting an item's data as argument, and outputs formatted HTML:
</p>
<pre class="prettyprint lang-js">var options = {
@ -1600,6 +1673,17 @@ var template = Handlebars.compile(source);
};
</pre>
<h3>React templates</h3>
You can use a React component for the templates by rendering them to the templates' element directly:
<pre class="prettyprint lang-js">
template: function (item, element) {
return ReactDOM.render(&lt;b&gt;{item.content}&lt;/b&gt;, element);
},
</pre>
<h3>Multiple templates</h3>
In order to support multiple templates, the template handler can be extended to switch between different templates, depending on a specific item property:
@ -1639,7 +1723,7 @@ var options = {
<h3>Create a new locale</h3>
To load a locale into the Timeline not supported by default, one can add a new locale to the option <code>locales</code>:
To load a locale (that is not supported by default) into the Timeline, one can add a new locale to the option <code>locales</code>:
<pre class="prettyprint lang-js">var options = {
locales: {
@ -1674,6 +1758,14 @@ var options = {
<code>en_US</code>
</td>
</tr>
<tr>
<td>Italian</td>
<td>
<code>it</code><br>
<code>it_IT</code><br>
<code>it_CH</code>
</td>
</tr>
<tr>
<td>Dutch</td>
<td>
@ -1681,13 +1773,20 @@ var options = {
<code>nl_NL</code><br>
<code>nl_BE</code>
</td>
</tr>
<tr>
<td>German</td>
<td>
<code>de</code><br>
<code>de_DE</code><br>
</td>
</tr>
</table>
<h2 id="Time_zone">Time zone</h2>
<p>
By default, the Timeline displays time in local time. To display a Timeline in an other time zone or in UTC, the date constructor can be overloaded via the configuration option <code>moment</code>, which by default is the constructor function of moment.js. More information about UTC with moment.js can be found in the docs: <a href="http://momentjs.com/docs/#/parsing/utc/">http://momentjs.com/docs/#/parsing/utc/</a>.
By default, the Timeline displays time in local time. To display a Timeline in another time zone or in UTC, the date constructor can be overloaded via the configuration option <code>moment</code>, which by default is the constructor function of moment.js. More information about UTC with moment.js can be found in the docs: <a href="http://momentjs.com/docs/#/parsing/utc/">http://momentjs.com/docs/#/parsing/utc/</a>.
</p>
<p>
@ -1761,7 +1860,7 @@ var options = {
<td>Days</td><td><code>vis-date1</code>, <code>vis-date2</code>, ..., <code>vis-date31</code></td>
</tr>
<tr>
<td>Months</td><td><code>vis-januari</code>, <code>vis-februari</code>, <code>vis-march</code>, <code>vis-april</code>, <code>vis-may</code>, <code>vis-june</code>, <code>vis-july</code>, <code>vis-august</code>, <code>vis-september</code>, <code>vis-october</code>, <code>vis-november</code>, <code>vis-december</code></td>
<td>Months</td><td><code>vis-january</code>, <code>vis-february</code>, <code>vis-march</code>, <code>vis-april</code>, <code>vis-may</code>, <code>vis-june</code>, <code>vis-july</code>, <code>vis-august</code>, <code>vis-september</code>, <code>vis-october</code>, <code>vis-november</code>, <code>vis-december</code></td>
</tr>
<tr>
<td>Years</td><td><code>vis-year2014</code>, <code>vis-year2015</code>, ...</td>

+ 1
- 1
examples/graph2d/01_basic.html View File

@ -13,7 +13,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Basic Example</h2>

+ 1
- 1
examples/graph2d/02_bars.html View File

@ -10,7 +10,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Bar Graph Example</h2>

+ 1
- 1
examples/graph2d/03_groups.html View File

@ -11,7 +11,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Groups Example</h2>

+ 1
- 1
examples/graph2d/04_rightAxis.html View File

@ -24,7 +24,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Right Axis Example</h2>

+ 1
- 1
examples/graph2d/05_bothAxis.html View File

@ -2,7 +2,7 @@
<html>
<head>
<title>Graph2d | Both Axis Example</title>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script src="../../dist/vis.js"></script>
<style type="text/css">

+ 1
- 1
examples/graph2d/06_interpolation.html View File

@ -2,7 +2,7 @@
<html>
<head>
<title>Graph2d | Interpolation</title>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body, html {
font-family: sans-serif;

+ 1
- 1
examples/graph2d/07_scrollingAndSorting.html View File

@ -10,7 +10,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Scrolling and Sorting</h2>

+ 1
- 1
examples/graph2d/08_performance.html View File

@ -18,7 +18,7 @@
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.4/moment.min.js"></script>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Performance</h2>

+ 3
- 3
examples/graph2d/09_external_legend.html View File

@ -2,7 +2,7 @@
<html>
<head>
<title>Graph2d | External legend Example</title>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body, html {
font-family: sans-serif;
@ -310,7 +310,7 @@
// get the legend for this group.
var legend = graph2d.getLegend(groupsData[i].id,30,30);
// append class to icon. All styling classes from the vis.css have been copied over into the head here to be able to style the
// append class to icon. All styling classes from the vis.css/vis-timeline-graph2d.min.css have been copied over into the head here to be able to style the
// icons with the same classes if they are using the default ones.
legend.icon.setAttributeNS(null, "class", "legend-icon");
@ -360,4 +360,4 @@
</script>
</body>
</html>
</html>

+ 1
- 1
examples/graph2d/10_barsSideBySide.html View File

@ -10,7 +10,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Bar Graphs Side by Side Example</h2>

+ 1
- 1
examples/graph2d/11_barsSideBySideGroups.html View File

@ -10,7 +10,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Bar Graphs Side by Side Example with Groups</h2>

+ 1
- 1
examples/graph2d/12_customRange.html View File

@ -10,7 +10,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Custom axis range</h2>

+ 1
- 1
examples/graph2d/13_localization.html View File

@ -15,7 +15,7 @@
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.8.1/moment-with-locales.min.js"></script>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Localization</h2>

+ 1
- 1
examples/graph2d/14_toggleGroups.html View File

@ -16,7 +16,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Groups Example</h2>

+ 1
- 1
examples/graph2d/15_streaming_data.html View File

@ -13,7 +13,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Streaming data</h2>

+ 1
- 1
examples/graph2d/16_bothAxisTitles.html View File

@ -2,7 +2,7 @@
<html>
<head>
<title>Graph2d | Axis Titles and Styling</title>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script src="../../dist/vis.js"></script>
<style type="text/css">

+ 1
- 1
examples/graph2d/17_dynamicStyling.html View File

@ -13,7 +13,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css"/>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css"/>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Dynamic Styling Example</h2>

+ 1
- 1
examples/graph2d/18_scatterplot.html View File

@ -10,7 +10,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Scatterplot</h2>

+ 1
- 1
examples/graph2d/19_labels.html View File

@ -17,7 +17,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Label Example</h2>

+ 1
- 1
examples/graph2d/20_shading.html View File

@ -11,7 +11,7 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
<body>
<h2>Graph2d | Shading Example</h2>

+ 19
- 5
examples/graph3d/11_tooltips.html View File

@ -5,6 +5,12 @@
<style>
body {font: 10pt arial;}
div#info {
width : 600px;
text-align: center;
margin-top: 2em;
font-size : 1.2em;
}
</style>
<script type="text/javascript" src="../../dist/vis.js"></script>
@ -24,6 +30,11 @@
// Create and populate a data table.
data = new vis.DataSet();
var extra_content = [
'Arbitrary information',
'You can access data from the point source object',
'Tooltip example content',
];
// create some nice looking data with sin/cos
var steps = 5; // number of datapoints will be steps*steps
@ -34,10 +45,10 @@
var z = custom(x,y);
if (withValue) {
var value = (y - x);
data.add({x:x, y:y, z: z, style:value});
data.add({x:x, y:y, z: z, style:value, extra: extra_content[(x*y) % extra_content.length]});
}
else {
data.add({x:x, y:y, z: z});
data.add({x:x, y:y, z: z, extra: extra_content[(x*y) % extra_content.length]});
}
}
}
@ -48,14 +59,16 @@
height: '600px',
style: style,
showPerspective: true,
showLegend: true,
showGrid: true,
showShadow: false,
// Option tooltip can be true, false, or a function returning a string with HTML contents
//tooltip: true,
tooltip: function (point) {
// parameter point contains properties x, y, z
return 'value: <b>' + point.z + '</b>';
// parameter point contains properties x, y, z, and data
// data is the original object passed to the point constructor
return 'value: <b>' + point.z + '</b><br>' + point.data.extra;
},
keepAspectRatio: true,
@ -99,6 +112,7 @@
<div id="mygraph"></div>
<div id="info"></div>
<div id="info">Hover the mouse cursor over the graph to see tooltips.</div>
</body>
</html>

+ 4
- 0
examples/graph3d/playground/index.html View File

@ -116,6 +116,10 @@
<td>showPerspective</td>
<td><input type="checkbox" id="showPerspective" checked /></td>
</tr>
<tr>
<td>showLegend</td>
<td><input type="checkbox" id="showLegend" checked /></td>
</tr>
<tr>
<td>showShadow</td>
<td><input type="checkbox" id="showShadow" /></td>

+ 1
- 0
examples/graph3d/playground/playground.js View File

@ -407,6 +407,7 @@ function getOptions() {
showAnimationControls: (document.getElementById("showAnimationControls").checked != false),
showGrid: (document.getElementById("showGrid").checked != false),
showPerspective: (document.getElementById("showPerspective").checked != false),
showLegend: (document.getElementById("showLegend").checked != false),
showShadow: (document.getElementById("showShadow").checked != false),
keepAspectRatio: (document.getElementById("keepAspectRatio").checked != false),
verticalRatio: document.getElementById("verticalRatio").value,

+ 1
- 1
examples/network/basicUsage.html View File

@ -4,7 +4,7 @@
<title>Network | Basic usage</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {

+ 1
- 1
examples/network/data/datasets.html View File

@ -4,7 +4,7 @@
<title>Network | Dynamic Data</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {

+ 1
- 1
examples/network/data/dotLanguage/dotLanguage.html View File

@ -3,7 +3,7 @@
<title>Network | DOT Language</title>
<script src="../../../../dist/vis.js"></script>
<link href="../../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<script src="../../../googleAnalytics.js"></script>
</head>
<body>

+ 1
- 1
examples/network/data/dotLanguage/dotPlayground.html View File

@ -5,7 +5,7 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="../../../../dist/vis.js"></script>
<link href="../../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body, html {

+ 1
- 1
examples/network/data/dynamicData.html View File

@ -53,7 +53,7 @@
</style>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css"/>
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
var nodes, edges, network;

+ 1
- 1
examples/network/data/importingFromGephi.html View File

@ -7,7 +7,7 @@
<script type="text/javascript" src="../exampleUtil.js"></script>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link type="text/css" rel="stylesheet" href="../../../dist/vis.css">
<link type="text/css" rel="stylesheet" href="../../../dist/vis-network.min.css">
<style type="text/css">
#mynetwork {

+ 1
- 1
examples/network/data/scalingCustom.html View File

@ -15,7 +15,7 @@
</style>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var nodes = null;

+ 1
- 1
examples/network/data/scalingNodesEdges.html View File

@ -15,7 +15,7 @@
</style>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var nodes = null;

+ 1
- 1
examples/network/data/scalingNodesEdgesLabels.html View File

@ -15,7 +15,7 @@
</style>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var nodes = null;

+ 55
- 0
examples/network/edgeStyles/arrowTypes.html View File

@ -0,0 +1,55 @@
<!doctype html>
<html>
<head>
<title>Network | Basic usage</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {
width: 600px;
height: 400px;
border: 1px solid lightgray;
}
</style>
</head>
<body>
<p>
There two type of liner endings. The classical "arrow" (default) and "circle".
</p>
<div id="mynetwork"></div>
<script type="text/javascript">
// create an array with nodes
var nodes = new vis.DataSet([
{id: 1, label: 'X'},
{id: 2, label: 'Y'},
{id: 3, label: 'Z'}
]);
// create an array with edges
var edges = new vis.DataSet([
{from: 1, to: 2, arrows:'to'},
{from: 2, to: 3, arrows:{
to: {
type: 'circle'
}
}},
]);
// create a network
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
edges: edges
};
var options = {};
var network = new vis.Network(container, data, options);
</script>
<script src="../../googleAnalytics.js"></script>
</body>
</html>

+ 1
- 1
examples/network/edgeStyles/arrows.html View File

@ -4,7 +4,7 @@
<title>Network | Basic usage</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {

+ 1
- 1
examples/network/edgeStyles/colors.html View File

@ -4,7 +4,7 @@
<title>Network | Basic usage</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {

+ 1
- 1
examples/network/edgeStyles/dashes.html View File

@ -4,7 +4,7 @@
<title>Network | Basic usage</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {

+ 1
- 1
examples/network/edgeStyles/smooth.html View File

@ -4,7 +4,7 @@
<title>Network | Static smooth curves</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {

+ 1
- 1
examples/network/edgeStyles/smoothWorldCup.html View File

@ -6,7 +6,7 @@
<title>Network | Static smooth curves - World Cup Network</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link type="text/css" rel="stylesheet" href="../../../dist/vis.css">
<link type="text/css" rel="stylesheet" href="../../../dist/vis-network.min.css">
<script src="../datasources/WorldCup2014.js"></script>

+ 1
- 1
examples/network/events/interactionEvents.html View File

@ -4,7 +4,7 @@
<title>Network | Interaction events</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css"/>
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
#mynetwork {

+ 1
- 1
examples/network/events/physicsEvents.html View File

@ -4,7 +4,7 @@
<title>Network | Basic usage</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css"/>
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
#mynetwork {

+ 1
- 1
examples/network/events/renderEvents.html View File

@ -4,7 +4,7 @@
<title>Network | Basic usage</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css"/>
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
#mynetwork {

+ 1
- 1
examples/network/exampleApplications/disassemblerExample.html View File

@ -7,7 +7,7 @@
border: 1px solid lightgray;
}
</style>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<script src="../../../dist/vis.js"></script>
</head>
<body>

+ 1
- 1
examples/network/exampleApplications/lesMiserables.html View File

@ -12,7 +12,7 @@
</style>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css"/>
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
function draw() {

+ 1
- 1
examples/network/exampleApplications/loadingBar.html View File

@ -86,7 +86,7 @@
</style>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css"/>
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
function draw() {

+ 1
- 1
examples/network/exampleApplications/neighbourhoodHighlight.html View File

@ -4,7 +4,7 @@
<title>Network | Static smooth curves - World Cup Network</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link type="text/css" rel="stylesheet" href="../../../dist/vis.css">
<link type="text/css" rel="stylesheet" href="../../../dist/vis-network.min.css">
<script src="../datasources/WorldCup2014.js"></script>

+ 1
- 1
examples/network/exampleApplications/nodeLegend.html View File

@ -19,7 +19,7 @@
</style>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link href="../../../dist/vis.css" rel="stylesheet" type="text/css" />
<link href="../../../dist/vis-network.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var nodes = null;

+ 1
- 1
examples/network/exampleApplications/worldCupPerformance.html View File

@ -6,7 +6,7 @@
<title>Network | Static smooth curves - World Cup Network</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>
<link type="text/css" rel="stylesheet" href="../../../dist/vis.css">
<link type="text/css" rel="stylesheet" href="../../../dist/vis-network.min.css">
<script src="../datasources/WorldCup2014.js"></script>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save