Browse Source

Fix showcase image

gh-pages
Yotam Berkowitz 7 years ago
parent
commit
135ac16a86
314 changed files with 33140 additions and 25228 deletions
  1. +0
    -912
      blog.html
  2. +30
    -0
      css/post-it.css
  3. BIN
      dist/img/timeline/delete.png
  4. +34
    -0
      dist/vis-graph3d.min.js
  5. +1
    -0
      dist/vis-network.min.css
  6. +42
    -0
      dist/vis-network.min.js
  7. +1
    -0
      dist/vis-timeline-graph2d.min.css
  8. +40
    -0
      dist/vis-timeline-graph2d.min.js
  9. +773
    -633
      dist/vis.css
  10. +21255
    -14499
      dist/vis.js
  11. +1
    -0
      dist/vis.js.map
  12. +1
    -1
      dist/vis.map
  13. +1
    -1
      dist/vis.min.css
  14. +24
    -23
      dist/vis.min.js
  15. +7
    -0
      docs/css/style.css
  16. +5
    -4
      docs/data/dataset.html
  17. +1
    -2
      docs/data/dataview.html
  18. +1
    -2
      docs/data/index.html
  19. +11
    -6
      docs/graph2d/index.html
  20. +96
    -26
      docs/graph3d/index.html
  21. +0
    -1
      docs/network/configure.html
  22. +318
    -9
      docs/network/edges.html
  23. +1
    -2
      docs/network/groups.html
  24. +95
    -24
      docs/network/index.html
  25. +1
    -2
      docs/network/interaction.html
  26. +3
    -4
      docs/network/layout.html
  27. +2
    -3
      docs/network/manipulation.html
  28. +368
    -6
      docs/network/nodes.html
  29. +1
    -2
      docs/network/physics.html
  30. +0
    -949
      docs/old/dataset.html
  31. +0
    -338
      docs/old/dataview.html
  32. +0
    -673
      docs/old/graph3d.html
  33. +0
    -225
      docs/old/index.html
  34. +0
    -2
      docs/old/lib/prettify/lang-apollo.js
  35. +0
    -2
      docs/old/lib/prettify/lang-css.js
  36. +0
    -2
      docs/old/lib/prettify/lang-hs.js
  37. +0
    -2
      docs/old/lib/prettify/lang-lisp.js
  38. +0
    -2
      docs/old/lib/prettify/lang-lua.js
  39. +0
    -2
      docs/old/lib/prettify/lang-ml.js
  40. +0
    -1
      docs/old/lib/prettify/lang-proto.js
  41. +0
    -2
      docs/old/lib/prettify/lang-scala.js
  42. +0
    -2
      docs/old/lib/prettify/lang-sql.js
  43. +0
    -2
      docs/old/lib/prettify/lang-vb.js
  44. +0
    -3
      docs/old/lib/prettify/lang-vhdl.js
  45. +0
    -2
      docs/old/lib/prettify/lang-wiki.js
  46. +0
    -2
      docs/old/lib/prettify/lang-yaml.js
  47. +0
    -1
      docs/old/lib/prettify/prettify.css
  48. +0
    -33
      docs/old/lib/prettify/prettify.js
  49. +0
    -1165
      docs/old/old_graph2d.html
  50. +0
    -2625
      docs/old/old_network.html
  51. +0
    -211
      docs/old/old_network/canvas.html
  52. +0
    -182
      docs/old/old_network/clustering.html
  53. +0
    -127
      docs/old/old_network/rendering.html
  54. +0
    -135
      docs/old/old_network/selection.html
  55. +0
    -161
      docs/old/old_network/view.html
  56. +0
    -1510
      docs/old/old_timeline.html
  57. +274
    -43
      docs/timeline/index.html
  58. BIN
      download/vis.zip
  59. +0
    -12
      examples/googleAnalytics.js
  60. +3
    -3
      examples/graph2d/01_basic.html
  61. +2
    -2
      examples/graph2d/02_bars.html
  62. +3
    -3
      examples/graph2d/03_groups.html
  63. +2
    -2
      examples/graph2d/04_rightAxis.html
  64. +2
    -2
      examples/graph2d/05_bothAxis.html
  65. +2
    -2
      examples/graph2d/06_interpolation.html
  66. +2
    -2
      examples/graph2d/07_scrollingAndSorting.html
  67. +3
    -3
      examples/graph2d/08_performance.html
  68. +4
    -4
      examples/graph2d/09_external_legend.html
  69. +2
    -2
      examples/graph2d/10_barsSideBySide.html
  70. +2
    -2
      examples/graph2d/11_barsSideBySideGroups.html
  71. +2
    -2
      examples/graph2d/12_customRange.html
  72. +2
    -2
      examples/graph2d/13_localization.html
  73. +2
    -2
      examples/graph2d/14_toggleGroups.html
  74. +2
    -2
      examples/graph2d/15_streaming_data.html
  75. +2
    -2
      examples/graph2d/16_bothAxisTitles.html
  76. +2
    -2
      examples/graph2d/17_dynamicStyling.html
  77. +2
    -2
      examples/graph2d/18_scatterplot.html
  78. +2
    -2
      examples/graph2d/19_labels.html
  79. +2
    -2
      examples/graph2d/20_shading.html
  80. +51
    -0
      examples/graph2d/21_barsWithEnd.html
  81. +1
    -1
      examples/graph3d/01_basics.html
  82. +1
    -1
      examples/graph3d/02_camera.html
  83. +1
    -1
      examples/graph3d/03_filter_data.html
  84. +1
    -1
      examples/graph3d/04_animation.html
  85. +1
    -1
      examples/graph3d/05_line.html
  86. +1
    -1
      examples/graph3d/06_moving_dots.html
  87. +7
    -3
      examples/graph3d/07_dot_cloud_colors.html
  88. +1
    -1
      examples/graph3d/08_dot_cloud_size.html
  89. +1
    -1
      examples/graph3d/09_mobile.html
  90. +1
    -1
      examples/graph3d/10_styling.html
  91. +35
    -7
      examples/graph3d/11_tooltips.html
  92. +1
    -1
      examples/graph3d/12_custom_labels.html
  93. +1
    -1
      examples/graph3d/playground/csv2datatable.html
  94. +1
    -1
      examples/graph3d/playground/datasource.html
  95. +18
    -1
      examples/graph3d/playground/index.html
  96. +4
    -0
      examples/graph3d/playground/playground.js
  97. +4
    -3
      examples/network/basicUsage.html
  98. +2
    -2
      examples/network/data/datasets.html
  99. +2
    -2
      examples/network/data/dotLanguage/dotLanguage.html
  100. +2
    -2
      examples/network/data/dotLanguage/dotPlayground.html

+ 0
- 912
blog.html View File

@ -1,912 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<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>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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">
<!-- 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>
html {
height: 100%;
}
body {
font-family: Lustria, Georgia, Times, "Times New Roman", serif !important;
height: 100%;
background: url('./images/crosswordStrong.png') /* Background pattern from subtlepatterns.com */
}
img.icon {
position: relative;
top: -2px;
}
div.navbar-wrapper {
background-color: #07508E;
border-bottom: 3px solid #ffffff;
font-size: 16px;
}
div.center {
width: 970px;
margin-left: auto;
margin-right: auto;
}
div.container.small {
max-width: 970px;
}
div.blogHeader {
margin-left: auto;
margin-right: auto;
text-align: center;
width: 910px;
padding: 0px 30px 0px 30px;
margin-top: -150px;
color: #ffffff;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
margin-bottom: 60px;
}
div.post {
margin: 40px 80px 0px 190px;
padding: 10px 10px 10px 20px;;
border: 1px solid #eeeeee;
border-radius: 3px;
}
div.postHeader {
float: left;
font-size: 30px;
}
div.postDate {
margin-top: 19px;
float: right;
font-size: 12px;
}
div.postAuthor {
padding-left: 5px;
margin-top: 19px;
margin-right: 20px;
float: right;
font-size: 12px;
}
div.postContent {
font-size: 16px;
margin-top: 50px;
padding: 10px 20px 0px 20px;
text-align: justify;
}
div.full {
min-height: 100%;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.4);
padding: 0px;
background-color: #ffffff;
}
div.postsMenu {
position: relative;
left: -15px;
top: -50px;
width: 0px;
height: 0px;
}
div.postsMenuContent {
padding: 10px;
background-color: #6787a6;
width: 180px;
height: 500px;
border-radius: 5px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.4);
color: #ffffff;
font-size: 16px;
}
a.post {
font-size: 12px;
text-decoration: none;
color: #ffffff;
display: block;
margin: 10px 0px 0px 0px;
}
</style>
</head>
<!-- NAVBAR
================================================== -->
<body>
<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="./docs/index.html" target="_blank">Documentation <img class="icon"
src="./images/external-link-icons/external-link-icon-white.png"></a>
</li>
<li class="active"><a href="#">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="./featureRequests.html">Feature requests</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 small">
<div class="center">
<img src="./images/wallHeader.png">
</div>
<div class="blogHeader">
<h1>vis.js</h1>
<p>A dynamic, browser based visualization library.
The library consists of the components DataSet, Timeline, Network, Graph2d and Graph3d. This blog is about
the latest developments, roadmap and releases.
</p>
</div>
<div class="postsMenu">
<div class="postsMenuContent">
Posts:
<a data-scroll class="post" href="#CrownstoneKickstarter">- The Crownstone kickstarter promotion</a>
<a data-scroll class="post" href="#V4Release">- V4, ES6 and what's next</a>
<a data-scroll class="post" href="#Released version 3.11.0">- Released version 3.11.0</a>
<a data-scroll class="post" href="#Released version 3.10.0">- Released version 3.10.0</a>
<a data-scroll class="post" href="#Released version 3.9.0">- Released version 3.9.0</a>
<a data-scroll class="post" href="#The 2015 roadmap for vis.js">- The 2015 roadmap for vis.js</a>
<a data-scroll class="post" href="#A look back on vis.js">- A look back on vis.js</a>
<a data-scroll class="post" href="#New website for vis.js!">- New website for vis.js!</a>
<a data-scroll class="post" href="#Released version 3.8.0">- Released version 3.8.0</a>
</div>
</div>
<div class="post">
<div class="postHeader" id="CrownstoneKickstarter">The Crownstone kickstarter promotion</div>
<div class="postAuthor">by <a href="https://github.com/alexdm0">Alex</a></div>
<div class="postDate">15th of September 2015</div>
<div class="postContent">
<p>
Hi Everyone,
</p>
<p>
So you may have noticed the big banner on our website and thought: "What the hell?". I'd like to explain why we're doing this. </p><p>
As you may know, vis.js is developed at Almende BV in the Netherlands. Almende has a number of daughter companies, among which: <a href="http://dobots.nl" target="_blank">DoBots</a>.
They share our building and we're working with them a lot! We have used their code and hardware in projects and have contributed some code for the
firmware as well.
</p>
<img src="./images/blog/kickstarter_1.png" style="position:relative; left:12px; padding:10px;">
<p><a href="https://www.kickstarter.com/projects/dobots/crownstone">DoBots is now doing a kickstarter for the Crownstone, a smart upgrade for any power socket!</a> Recently I have spend a few weeks helping them settings up their campaign. I made the video's,
the 3D artwork and helped out with the texts. I think this is a great product and I believe it deserves a chance to enter the market!</p>
<img src="./images/blog/kickstarter_2.png" style="position:relative; left:12px; padding:10px;">
<p>Like us (the vis.js team), the guys at DoBots believe in open source. The Crownstone's Bluetooth API's will be open but secure so only YOU can use YOUR Crownstones. This means you can use any BLE device to interact with your house!
If the stretchgoal is made, there'll even be Arduino support! I will also be working on the iOS app and that too will be open source.</p>
<p>I hope our community can help <a href="https://www.kickstarter.com/projects/dobots/crownstone">the kickstarter</a> reach it's goal and maybe even the stretchgoals.</p>
<img src="./images/blog/kickstarter_3.png" style="position:relative; left:12px; padding:10px;">
<p><a href="https://www.kickstarter.com/projects/dobots/crownstone">Please support us and spread the word!</a></p><p>If you share it in a tweet, facebook or different way, <a href="https://github.com/almende/vis/issues/1302">leave a comment in issue #1302! :)</a></p>
<p>Regards and thank you,</p>
<p>Alex</p>
</div>
</div>
<div class="post">
<div class="postHeader" id="V4Release">V4, ES6 and what's next</div>
<div class="postAuthor">by <a href="https://github.com/alexdm0">Alex</a></div>
<div class="postDate">22nd of May 2015</div>
<div class="postContent">
<p>
It’s been a long time coming but its finally here! We have just released the newest version of vis.js:
v4! This is a breaking release (hence the version number change). This means the options and the API
have been changed in such a way that it is no longer backwards compatible.
</p>
<p>
We know it is annoying to go back to your code and making the required changes, but I guarantee that it
is for the best. To help with this migration, we have included an option validator to our new release.
This validator is currently applied on the network, timeline and graph2d. It checks if the options you
supply are of the right type. If your options do not exist or if the type is wrong, it will give
you an understandable message with suggestions of options you may have meant. We think this will make
developing for vis a lot easier, as well as the migration from v3 to v4.
</p>
<p>
The biggest change in this release is in the network module. We have rewritten the network module in
full and the results are cleanly separated ES6 modules. The option structure has been changed to suit
this structure. The options have also been grouped, making it easier to document and understand. For example,
lets look at the options for fonts. It used to be fontColor, fontFace fontSize, which is now
grouped in a font object with {color:’’,face:’’,size:’’}. Also completely new is the clustering
mechanism. It used to be mostly automatic and twitchy but this new version gives all the control to the
user. This should make the clustering very useful and I’ll be happy to hear of missing features for
this!
</p>
<p>
We have moved to hammer.js 2 for all of our touch and click events, and a lot of work has gone into
updating all the css elements (especially for timeline) to eliminate conflicts with large frameworks
that overload <i>everything</i>.
</p>
<p>
Over the last year, we have received a lot of issues on our Github page for which we are very thankful.
Whether it is a bug report, question or feature request, we handle all of them as quickly as we can, and
with these big new rewrites it gives us a new perspective on what is important. We hope the validator
will prevent a lot of issues. The new examples have also been designed to more clearly show simple
options. We plan to provide links to JSBin for all options, but this is a lot of work (for which we
wouldn’t mind some help ;) ).
</p>
<p>
So what’s next? Well the next module that really needs a good overhaul is the graph2d. This module is
used by us internally quite a lot, and we need to improve the architecture and make it easy to extend it
with new graph types.
</p>
<p>
We want to unify the code between the timeline and the graph2d even more. The ideal result would be
using a graph2d as a group in the timeline, or use the timeline items in a graph2d without nasty hacks.
The graph2d should get numeric x axis (so not necessarily only time), logarithmic axis and hopefully the
architecture will be flexible enough to allow the x and y axis to be interchanged. The API across the
modules will also be further unified, and I think we’ve made a great start with v4!
</p>
<p>
From all the modules currently in vis, the graph3d is the oldest and currently the one suffering a lack
of attention. If you are an excited user of the graph3d module and want to contribute, we’re open for
additions to the vis.js team! The graph3d is feature complete but a webgl implementation could be a
great improvement.
</p>
<p>
I cannot give a timeframe for the things I have discussed here, and we’re always open for ideas and
contributions. If you feel like you want to contribute, let us know :).
</p>
<h3>Changelog:</h3>
<h4>General</h4>
<ul>
<li>Changed the build scripts to include a transpilation of ES6 to ES5
(using <a href="http://babel.org">http://babel.org</a>), so we can use ES6 features in the vis.js
code.
When creating a custom bundle using browserify, one now needs to add a
transform step using <code>babelify</code>, this is described in README.md.
</li>
</ul>
<h4>Timeline</h4>
<ul>
<li>Integrated an option configurator and validator.</li>
<li>Implemented option <code>multiselect</code>, which is false by default.</li>
<li>Added method <code>setData({groups: groups, items: items})</code>.</li>
<li>Fixed range items not being displayed smaller than 10 pixels (twice the
padding). In order to have overflowing text, one should now apply css style
<code>.vis.timeline .item.range { overflow: visible; }</code> instead of
<code>.vis.timeline .item.range .content { overflow: visible; }</code>.
See example 18_range_overflow.html.
</li>
<li>Fixed invalid css names for time axis grid, renamed hours class names from
<code>4-8h</code> to <code>h4-h8</code>.
</li>
<li>Deprecated option <code>showCustomTime</code>. Use method <code>addCustomTime()</code> instead.</li>
<li>Deprecated event <code>finishedRedraw</code> as it's redundant.</li>
<li>Renamed option <code>animate</code> to <code>animation</code>, and changed it to be either a boolean
or an object <code>{duration: number, easingFunction: string}</code>.
</li>
<li>Fixed #831: items losing selection when their type changed.</li>
</ul>
<h4>Graph2d</h4>
<ul>
<li>New option structure.</li>
<li>Cleaned up docs.</li>
<li>Fixed #628: stacking order.</li>
<li>Fixed #624: sorting order.</li>
<li>Fixed #616: stacking with negative bars.</li>
<li>Fixed #728: alignment issues.</li>
<li>Fixed #716: Height of graph <code>2px</code> too large when configuring a fixed height.</li>
</ul>
<h4>Network</h4>
<p>The network has been completely rewritten. The new modular setup using ES6 classes makes
it future proof for maintainability, extendability and clarity. A summary of new features:</p>
<ul>
<li>New examples, categorized by topic.</li>
<li>New docs.</li>
<li>New option structure, adhering to the modular setup on the backend.</li>
<li>New events for user interaction.</li>
<li>New render events for drawing custom elements on the canvas.</li>
<li>New physics events for making a loading bar during stabilization.</li>
<li>A lot of new methods that make extending easier.</li>
<li>Manipulation system now works without the UI neccesarily.</li>
<li>Nodes and edges can cast shadows.</li>
<li>Configurator system to dynamically change almost all options.</li>
<li>Validator has been created for the network's options, warning you about typo's and suggesting
alternatives.
</li>
<li>Diamond shape for nodes.</li>
<li>Unified the label code so edges and nodes have the same label settings.</li>
<li>InheritColors for edges can be set to both, making a gradient fade between two node colors.</li>
<li>Redesigned the clustering system giving full control over it.</li>
<li>Random seed can be saved so the network will be the same every time you start it.</li>
<li>New physics solver based on ForceAtlas2 as implemented in gephi.]</li>
<li>New avoidOverlap option for physics.</li>
<li>Many, many bugfixes.</li>
</ul>
<h4>DataSet</h4>
<ul>
<li>Dropped support for Google visualization DataTable.</li>
<li>Dropped support for appending data returned by <code>DataSet.get()</code> to an existing
Array or DataTable.
</li>
</ul>
</div>
</div>
<div class="post">
<div class="postHeader" id="Released version 3.11.0">Released version 3.11.0</div>
<div class="postAuthor">by <a href="https://github.com/josdejong">Jos</a></div>
<div class="postDate">6th of March 2015</div>
<div class="postContent">
<p>
Today we released vis.js version 3.11.0. The Timeline has gotten quite some attention in this release:
For example, the Timeline finally has gotten more event handlers to enable custom behavior in a flexible
way. Network is evolving at a steady speed. It's really great to get more and more substantial
contributions from the community latest months! Thanks.
</p>
<p>Changelog:</p>
<h3>Network</h3>
<ul>
<li>(added gradient coloring for lines, but set for release in 4.0 due to required refactoring of
options).
</li>
<li>Fixed bug where a network that has frozen physics would resume redrawing after setData, setOptions
etc.
</li>
<li>Added option to bypass default groups. If more groups are specified in the nodes than there are in
the groups, loop over supplied groups instead of default.
</li>
<li>Added two new static smooth curves modes: curveCW and curve CCW.</li>
<li>Added request redraw for certain internal processes to reduce number of draw calls (performance
improvements!).
</li>
<li>Added pull request for usage of Icons. Thanks @Dude9177!
<li>Allow hierarchical view to be set in setOptions.</li>
<li>Fixed manipulation bar for mobile.</li>
<li>Fixed #670: Bug when updating data in a DataSet, when Network is connected to the DataSet via a
DataView.
</li>
<li>Fixed #688: Added a css class to be able to distinguish buttons "Edit node" and "Edit edge".</li>
</ul>
<h3>Timeline</h3>
<ul>
<li>Implemented orientation option `'both'`, displaying a time axis both on top
and bottom (#665).
</li>
<li>Implemented creating new range items by dragging in an empty space with the
ctrl key down.
</li>
<li>Implemented configuration option `order: function` to define a custom ordering
for the items (see #538, #234).
</li>
<li>Implemented events `click`, `doubleClick`, and `contextMenu`.</li>
<li>Implemented method `getEventProperties(event)`.</li>
<li>Fixed not property initializing with a DataView for groups.</li>
<li>Merged add custom timebar functionality, thanks @aytech!
<li>Fixed #664: end of item not restored when canceling a move event.</li>
<li>Fixed #609: reduce the left/right dragarea when an item range is very small,
so you can still move it as a whole.
</li>
<li>Fixed #676: misalignment of background items when using subgroups and the
group label's height is larger than the contents.
</li>
</ul>
<h3>Graph2d</h3>
<ul>
<li>Implemented events `click`, `doubleClick`, and `contextMenu`.</li>
<li>Implemented method `getEventProperties(event)`.</li>
</ul>
<h3>DataSet/DataView</h3>
<ul>
<li>Implemented support for mapping field names. Thanks @spatialillusions.</li>
<li>Fixed #670: DataView not passing a data property on update events (see #670)
</ul>
</div>
</div>
<div class="post">
<div class="postHeader" id="Released version 3.10.0">Released version 3.10.0</div>
<div class="postAuthor">by <a href="https://github.com/josdejong">Jos</a></div>
<div class="postDate">11th of February 2015</div>
<div class="postContent">
<p>
Version 3.10.0 has been released. Lots of improvements in Network, and some smaller bug fixes and
improvements in Timeline and DataSet.
</p>
<p>Changelog:</p>
<h3>Network</h3>
<ul class="task-list">
<li>Added option bindToWindow (default true) to choose whether the keyboard binds are global or to the
network div.
</li>
<li>Improved images handling so broken images are shown on all references of images that are broken.
</li>
<li>Added getConnectedNodes method.</li>
<li>Added fontSizeMin, fontSizeMax, fontSizeMaxVisible, scaleFontWithValue, fontDrawThreshold to
Nodes.
</li>
<li>Added fade in of labels (on nodes) near the fontDrawThreshold.</li>
<li>Added nodes option to zoomExtent to zoom in on specific set of nodes.</li>
<li>Added stabilizationIterationsDone event which fires at the end of the internal stabilization run.
Does not imply that the network is stabilized.
</li>
<li>Added freezeSimulation method.</li>
<li>Added clusterByZoom option.</li>
<li>Added class name 'network-tooltip' to the tooltip, allowing custom styling.</li>
<li>Fixed bug when redrawing was not right on zoomed-out browsers.</li>
<li>Added opacity option to edges. Opacity is only used for the unselected state.</li>
<li>Fixed bug where selections from removed data elements persisted.</li>
</ul>
<h3>Timeline</h3>
<ul class="task-list">
<li>`Timeline.redraw()` now also recalculates the size of items.</li>
<li>Implemented option `snap: function` to customize snapping to nice date when dragging items.</li>
<li>Implemented option `timeAxis: {scale: string, step: number}` to set fixed scale.</li>
<li>Fixed width of range items not always being maintained when moving due to snapping to nice dates.
</li>
<li>Fixed not being able to drag items to an other group on mobile devices.</li>
<li>Fixed `setWindow` not working when applying an interval larger than the configured `zoomMax`.</li>
</ul>
<h3>DataSet/DataView</h3>
<ul class="task-list">
<li>Added property `length` holding the total number of items to the `DataSet and `DataView`.</li>
<li>Added a method `refresh()` to the `DataView`, to update filter results.</li>
<li>Fixed a bug in the `DataSet` returning an empty object instead of `null` when no item was found when
using both a filter and specifying fields.
</li>
</ul>
</div>
</div>
<div class="post">
<div class="postHeader" id="Released version 3.9.0">Released version 3.9.0</div>
<div class="postAuthor">by <a href="https://github.com/AlexDM0">Alex</a></div>
<div class="postDate">16th of January 2015</div>
<div class="postContent">
<p>
We have been very busy fixing a lot of the open Github issues over the last week. We have also received
multiple pull requests that could be added quickly! Special thanks to
our community members contributing this release: @klmdb, @pavlos256, @T-rav, @brendon1982.
Since this is a release with new features, we push the version number up to 3.9.0. Next up: big
refactoring and version 4.0.0!
</p>
<p>Changelog:</p>
<h3>
<a class="anchor" href="#network" aria-hidden="true"><span class="octicon octicon-link"></span></a>Network
</h3>
<ul class="task-list">
<li>Reverted change in image class, fixed bug #552</li>
<li>Improved the fontFill offset between different browsers. #365</li>
<li>Fixed dashed lines on firefox on Unix systems</li>
<li>Altered the Manipulation Mixin to be succesfully destroyed from memory when calling destroy();</li>
<li>Improved drawing of arrowheads on smooth curves. #349</li>
<li>Caught case where click originated on external DOM element and drag progressed to vis.</li>
<li>Added label stroke support to Nodes, Edges &amp; Groups as per-object or global settings. Thank you
@klmdb!
</li>
<li>Reverted patch that made nodes return to 'default' setting if no group was assigned to fix issue
#561.
The correct way to 'remove' a group from a node is to assign it a different one.
</li>
<li>Made the node/edge selected by the popup system the same as selected by the click-to-select system.
Thank you @pavlos256!
</li>
<li>Improved edit edge control nodes positions, altered style a little.</li>
<li>Fixed issue #564 by resetting state to initial when no callback is performed in the return
function.
</li>
<li>Added condition to Repulsion similar to BarnesHut to ensure nodes do not overlap.</li>
<li>Added labelAlignment option to edges. Thanks @T-rav!</li>
<li>Close active sessions in dataManipulation when calling setData().</li>
</ul>
<h3>
<a class="anchor" href="#timeline" aria-hidden="true"><span class="octicon octicon-link"></span></a>Timeline
</h3>
<ul class="task-list">
<li>Added byUser flag to options of the rangechange and rangechanged event.</li>
</ul>
</div>
</div>
<div class="post">
<div class="postHeader" id="The 2015 roadmap for vis.js">The 2015 roadmap for vis.js</div>
<div class="postAuthor">by <a href="https://github.com/AlexDM0">Alex</a></div>
<div class="postDate">9th of January 2015</div>
<div class="postContent">
<p>
I initially wanted to do a small recap of vis.js so far but it became larger (and more off topic) than I
expected. To understand some of the motivations for our roadmap, <a href="#A look back on vis.js">take a
look at the post below this one first</a>.
</p>
<p>
So now for our plans for 2015! We have added a lot of features over the last year, and we have to be
careful that vis does not die of option-obesity. To mediate this we thought of a few solutions.
Firstly, we will make the docs collapsible using a similar system to <a
href="https://www.jsoneditoronline.org/" target="_blank">Jos&prime;s great online JSON editor</a>.
This is naturally a temporary fix but
the docs are one of the most important ways to get information. We think we ourselves may be the most
frequent visitor of those pages so it's a good start!
</p>
<p>
Secondly, the actual changes, we plan to reorganize some of the option structure. This will
unfortunately (but by definition) be a breaking change from our old versions. The new structure will be
clearer and more intuitive. The work our current
users will have to do to update will be minimal. If you're using the options we reorganize, you'll have
to update your options. Breaking releases are always a shame, but we feel it is necessary.
</p>
<p>
The third step we want to take is to go over the code of each module and modularize everything much
more. This will make the code easier to maintain as we move away from very large .js files, as well as
make it easier to expand on.
</p>
<p>
Once everything is modularized, we want to change the API to allow users to plug their own parts of vis
together. As an example: You start a network module, plug in the type of node module, edge module,
physics module and optionally navigation module (etc.) and you're good to go!
All of these modules will be individually configured. This means the huge list of options will be
segmented into smaller, more manageable parts. Additionally, the docs will become smaller and clearer.
</p>
<p>
Of course, we do not want to abandon all our plug-and-play functionality! We will also start to supply
more preconfigured constructors (i.e. a vis.BarChart that will give you a preconfigured graph2d module).
Apart from these constructors
we will continue to publish examples which will include code snippets that you can use in your own
project.
</p>
<p>
Once this has been completed, we expect there will be more options that accept functions as arguments
which gives you more control over vis. Finally, because everything (well, more than now) would be split
up into
modules, it becomes easier for the community to create additional modules, further improving vis!
</p>
<p>
The things I have listed here are the ideas that we have now. This is subject to change. We also cannot
provide a timeline for this because we work on vis whenever we have time. No deadlines, no constrains,
just when we have time.
</p>
<p>
To wrap up, there are a few things I did not mention here but I'd like to add to the post anyway.
<ul>
<li>We want to improve the fusion of graph2d and the timeline, with the ideal that a graph2d can be used
like a group in timeline now.
</li>
<li>Examples will be split in simple option/configuration examples and larger, feature
demonstration/exploration examples.
</li>
<li>Graph2d will be expanded.</li>
<li>We will move to hammer.js 2.0.</li>
<li>We will add features <a href="./featureRequests.html" target="_blank">from the list</a> when we can
</li>
<li>We hope to keep up the
<communi></communi>
cation with our community!
</li>
</ul>
Let's make 2015 as good as last year!
</p>
</div>
</div>
<div class="post">
<div class="postHeader" id="A look back on vis.js">A look back on vis.js</div>
<div class="postAuthor">by <a href="https://github.com/AlexDM0">Alex</a></div>
<div class="postDate">9th of January 2015</div>
<div class="postContent">
<p>
In April 2013, the initial commit was made for vis.js by <a href="https://github.com/josdejong">Jos</a>
because the old CHAP LINKS library was becoming too large to expand and maintain.
Vis.js was a clean, new start using all the knowledge gathered from the CHAP library with the ideal that
the new infrastructure would be more stable, faster and easier to maintain.
</p>
<p>
In January 2014, I joined the project and started to expand the Network module, which was called Graph
back then. I have been working alongside Jos since then we have poured a lot of hours into vis.
</p>
<p>
On the 16th of April 2014, exactly a year after the initial commit, <a
href="https://twitter.com/hackernewsbot/status/456231005678874624" target="_blank">a twitterbot with
a lot of followers</a> notified
the world that we were featured on hackernews! This was the boost we needed to really reach a large
community. We saw the amount of visitors and Github stars increase greatly over the months that
followed.
</p>
<p>
The 14th of October, we have altered the license of vis.js to MIT or APACHE 2.0. This allowed <a
href="http://tiddlywiki.com/" target="_blank">Tiddlywiki</a> to add vis.js to their keychain. From
what we hear,
their developers really enjoy working with vis and we look forward to hearing how their community uses
our software!
</p>
<p>
Now, we have a great community that helps out in issues, fixes our typos in the docs, notifies us of
bugs and sometimes fixes them for us. We have received pull requests with new features and improvements
and
it has been fantastic!
</p>
<p>
This post started out as the roadmap for vis in 2015, but the review was longer than I initially
expected thereby deserving its own post.
</p>
<p>
Have fun using vis!
</p>
</div>
</div>
<div class="post">
<div class="postHeader" id="New website for vis.js!">New website for vis.js!</div>
<div class="postAuthor">by <a href="https://github.com/AlexDM0">Alex</a></div>
<div class="postDate">9th of January 2015</div>
<div class="postContent">
<p>
The old website served us well, but now that we arrived in 2015... it is really time for an upgrade! We
hope the new website is more informative, modern and a good promotion for vis.js!
It also allows us to keep the community updated through this blog and to <a href="./showcase/index.html"
target="_blank">show off
great projects that make use of vis.js in our showcase</a>.
</p>
<p>If you have made something and would like it featured,
please make an <a href="https://github.com/almende/vis/issues" target="_blank">issue on Github</a> with
your project and how you'd like to be credited.</p>
</p><p>
The new website is in beta so if anyone spots a typo or other mistake, please let us know on our <a
href="https://www.github.com/almende/vis" target="_blank">Github</a> page.
</p>
<p>
There is no forum on this website. We prefer to keep all the communication with the community through
Github. We believe this is the best solution so everyone only has to check the Github issues
when there is a problem or suggestion.
</p>
<p>
A big change introduced with our new website, is the <a href="./featureRequests.html" target="_blank">feature
request page</a>. There are a lot of issues on Github that suggest features but we do not
always have time to implement these ourselves. On the other hand, there have been issues where people
tell us they want to contribute but are now sure where to start. To mediate this (and to make a clear
overview
for ourselves) we listed everything <a href="./featureRequests.html" target="_blank">here</a>.
</p>
<p>Once a feature is added to <a href="./featureRequests.html" target="_blank">the list</a>, it is not the
end of the line. At each new release, we'll look at the list and see which features we may want to pick
up for the next one. Discussions on these features
can still continue on the referenced Github issues. When we have added a feature to this list, we will
close the Github issue that requested it to keep our open issues more of a bug-todo list. The main
motivation for this
is because we have noticed that old bugs (on pages after 2) would be overlooked from time to time.
</p>
<p>
This feature page is an experiment. If it turns out that the community does not like us closing issues
with open feature requests or if it does not have the impact we'd like it to have, we'll revert back to
the old model.
</p>
<p>
We thank you all for using vis! Last year has seen a great increase in our user base and it is a great
motivating factor knowing that our work is used by others!
</p>
<p>
Here's to a great 2015!
</p>
</div>
</div>
<div class="post">
<div class="postHeader" id="Released version 3.8.0">Released version 3.8.0</div>
<div class="postAuthor">by <a href="https://github.com/AlexDM0">Alex</a></div>
<div class="postDate">9th of January 2015</div>
<div class="postContent">
<p>
We're proud to present a new version of the vis.js library: 3.8.0! This release has a lot of new
features and bugfixes, nearly all of which were suggested and/or discovered
by our community on <a href="https://www.github.com/almende/vis" target="_blank">Github</a>. A lot of
the issues on Github have been handled in this release and it is likely to be the
last release before 4.0.0. The 4.0.0 release will break compatibility with old code (only options will
be revisited on the API side) but more on that in <a href="#The 2015 roadmap for vis.js">the roadmap
post</a>.
</p>
<p>Changelog:</p>
<h3>
<a class="anchor" href="#network" aria-hidden="true"><span class="octicon octicon-link"></span></a>Network
</h3>
<ul class="task-list">
<li>Fixed flipping of hierarchical network on update when using RL and DU.</li>
<li>Added zoomExtentOnStabilize option to network.</li>
<li>Improved destroy function, added them to the examples.</li>
<li>Nodes now have bounding boxes that are used for zoomExtent.</li>
<li>Made physics more stable (albeit a little slower).</li>
<li>Added a check so only one 'activator' overlay is created on clickToUse.</li>
<li>Made global color options for edges overrule the inheritColors.</li>
<li>Improved cleaning up of the physics configuration on destroy and in options.</li>
<li>Made nodes who lost their group revert back to default color.</li>
<li>Changed group behaviour, groups now extend the options, not replace. This allows partial defines of
color.
</li>
<li>Fixed bug where box shaped nodes did not use hover color.</li>
<li>Fixed Locales docs.</li>
<li>When hovering over a node that does not have a title, the title of one of the connected edges that
HAS a title is no longer shown.
</li>
<li>Fixed error in repulsion physics model.</li>
<li>Improved physics handling for smoother network simulation.</li>
<li>Fixed infinite loop when an image can not be found and no brokenImage is provided.</li>
<li>Added getBoundingBox method.</li>
<li>Community fix for SVG images in IE11, thanks @dponch!</li>
<li>Fixed repeating stabilized event when the network is already stabilized.</li>
<li>Added circularImages, thanks for the contribution @brendon1982!</li>
</ul>
<h3>
<a class="anchor" href="#graph2d" aria-hidden="true"><span class="octicon octicon-link"></span></a>Graph2d
</h3>
<ul class="task-list">
<li>Fixed round-off errors of zero on the y-axis.</li>
<li>added show major/minor lines options to dataAxis.</li>
<li>Fixed adapting to width and height changes.</li>
<li>Added a check so only one 'activator' overlay is created on clickToUse.</li>
<li>DataAxis width option now draws correctly.</li>
</ul>
<h3>
<a class="anchor" href="#timeline" aria-hidden="true"><span class="octicon octicon-link"></span></a>Timeline
</h3>
<ul class="task-list">
<li>Implemented support for styling of the vertical grid.</li>
<li>Support for custom date formatting of the labels on the time axis.</li>
<li>added show major/minor lines options to timeline.</li>
<li>Added a check so only one 'activator' overlay is created on clickToUse.</li>
</ul>
<h3>
<a class="anchor" href="#graph3d" aria-hidden="true"><span class="octicon octicon-link"></span></a>Graph3d
</h3>
<ul class="task-list">
<li>Fixed mouse coordinates for tooltips.</li>
</ul>
</div>
</div>
<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>

+ 30
- 0
css/post-it.css View File

@ -0,0 +1,30 @@
@import url(https://fonts.googleapis.com/css?family=Gloria+Hallelujah);
.post-it {
background:#fefabc;
padding: 15px;
font-family: "Gloria Hallelujah";
font-size: 18px;
line-height: 1.3em;
color: #000;
width: 320px;
-moz-transform: rotate(7deg);
-webkit-transform: rotate(7deg);
-o-transform: rotate(7deg);
-ms-transform: rotate(7deg);
transform: rotate(7deg);
box-shadow: 0px 4px 6px #333;
-moz-box-shadow: 0px 4px 6px #333;
-webkit-box-shadow: 0px 4px 6px #333;
}
.post-it-top-right {
position: absolute;
top: 50px;
right: 100px;
z-index: 999;
}

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

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

+ 34
- 0
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


+ 42
- 0
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


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


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


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


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


+ 1
- 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


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


+ 7
- 0
docs/css/style.css View File

@ -128,6 +128,13 @@ tr.visible {
fadeIn 250ms ease-in;
}
tr.depricated td {
color: #AAA;
text-decoration: line-through;
}
tr.depricated td:last-child {
text-decoration: none;
}
@-webkit-keyframes fadeIn {
0% {

+ 5
- 4
docs/data/dataset.html View File

@ -53,7 +53,6 @@
<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>
@ -598,9 +597,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>

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

@ -53,7 +53,6 @@
<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>
@ -410,4 +409,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>

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

@ -53,7 +53,6 @@
<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>
@ -135,4 +134,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>

+ 11
- 6
docs/graph2d/index.html View File

@ -96,7 +96,6 @@
<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>
@ -297,7 +296,13 @@ var items = [
<td>label</td>
<td>Object</td>
<td>no</td>
<td>A label object which will be displayed near to the item. A label object has one requirement - a <b> content </b> property. In addition you can set the <b> xOffset, yOffset and className </b> for further appearance customisations </td>
<td>A label object which will be displayed near to the item. A label object has one requirement - a <b> content </b> property. In addition you can set the <b> xOffset, yOffset and className </b> for further appearance customisations.</td>
</tr>
<tr>
<td>end</td>
<td>Date</td>
<td>no</td>
<td>A location on the x-axis that when supplied will have the bar stretch to the end point and ignore the barChart.width property.</td>
</tr>
</table>
@ -569,7 +574,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: {
@ -577,7 +582,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) {
@ -1162,7 +1167,7 @@ function (option, path) {
<li><code>x</code> (Number): relative horizontal position of the click event.</li>
<li><code>y</code> (Number): relative vertical position of the click event.</li>
<li><code>time</code> (Date): Date of the clicked event.</li>
<li><code>value</code> (Number[]): The data value of the click event. The array contains one value when there is one data axis visible, and two values when there are two visible data axes.</li>
<li><code>value</code> (Number[]): The data value of the click event. The array contains one value when there is one data axis visible, and two values when there are two visible data axes. It is empty when no data is provided.</li>
<li><code>what</code> (String or null): name of the clicked thing: <code>background</code>, <code>axis</code>, <code>dat-axis</code>, <code>custom-time</code>, or <code>current-time</code>, <code>legend</code>.</li>
<li><code>event</code> (Object): the original click event.</li>
</ul>
@ -1202,7 +1207,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>

+ 96
- 26
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">
@ -53,7 +53,6 @@
<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>
@ -184,7 +183,7 @@
<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.
the graph to. Optionally, data and 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
@ -364,13 +363,13 @@ var options = {
<td>dataColor.fill</td>
<td>string</td>
<td>'#7DC1FF'</td>
<td>The border color of the dots or bars. Applicable when using styles <code>dot-size</code> or <code>bar-size</code>.</td>
<td>The fill color of the dots or bars. Applicable when using styles <code>dot-size</code>, <code>bar-size</code>, or <code>line</code>.</td>
</tr>
<tr>
<td>dataColor.stroke</td>
<td>string</td>
<td>'#3267D2'</td>
<td>The fill color of the dots or bars. Applicable when using styles <code>dot-size</code>, <code>bar-size</code>, or <code>line</code>.</td>
<td>The border color of the dots or bars. Applicable when using styles <code>dot-size</code> or <code>bar-size</code>.</td>
</tr>
<tr>
<td>dataColor.strokeWidth</td>
@ -422,9 +421,27 @@ var options = {
<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
<td>If true, grid lines are drawn in the x-y surface (the bottom of the 3d
graph).</td>
</tr>
<tr>
<td>showXAxis</td>
<td>boolean</td>
<td>true</td>
<td>If true, X axis and X axis labels are drawn.</td>
</tr>
<tr>
<td>showYAxis</td>
<td>boolean</td>
<td>true</td>
<td>If true, Y axis and Y axis labels are drawn.</td>
</tr>
<tr>
<td>showZAxis</td>
<td>boolean</td>
<td>true</td>
<td>If true, Z axis and Z axis labels are drawn.</td>
</tr>
<tr>
<td>showPerspective</td>
<td>boolean</td>
@ -435,6 +452,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>
@ -466,11 +491,44 @@ 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>
<tr>
<td>tooltipStyle</td>
<td>Object</td>
<td>
<pre class="prettyprint lang-js">
{
content: {
padding: '10px',
border: '1px solid #4d4d4d',
color: '#1a1a1a',
background: 'rgba(255,255,255,0.7)',
borderRadius: '2px',
boxShadow: '5px 5px 10px rgba(128,128,128,0.5)'
},
line: {
height: '40px',
width: '0',
borderLeft: '1px solid #4d4d4d'
},
dot: {
height: '0',
width: '0',
border: '5px solid #4d4d4d',
borderRadius: '5px'
}
}</pre>
</td>
<td>Tooltip style properties.
Provided properties will be merged with the default object.
</td>
</tr>
<tr>
<td>valueMax</td>
<td>number</td>
@ -505,8 +563,8 @@ var options = {
<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.
<td>The width of bars in x direction. By default, the width is equal to the smallest distance
between the data points.
Only applicable for styles <code>'bar'</code> and <code>'bar-color'</code>.</td>
</tr>
@ -520,14 +578,18 @@ var options = {
<tr>
<td>xMax</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the x-axis.</td>
<td>from data</td>
<td>The maximum value for the x-axis.
If not set, the largest value for x in the data set is used.
</td>
</tr>
<tr>
<td>xMin</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the x-axis.</td>
<td>from data</td>
<td>The minimum value for the x-axis.
If not set, the smallest value for x in the data set is used.
</td>
</tr>
<tr>
<td>xStep</td>
@ -548,8 +610,8 @@ var options = {
<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.
<td>The width of bars in y direction. By default, the width is equal to the smallest distance
between the data points.
Only applicable for styles <code>'bar'</code> and <code>'bar-color'</code>.</td>
</tr>
@ -563,14 +625,18 @@ var options = {
<tr>
<td>yMax</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the y-axis.</td>
<td>from data</td>
<td>The maximum value for the y-axis.
If not set, the largest value for y in the data set is used.
</td>
</tr>
<tr>
<td>yMin</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the y-axis.</td>
<td>from data</td>
<td>The minimum value for the y-axis.
If not set, the smallest value for y in the data set is used.
</td>
</tr>
<tr>
<td>yStep</td>
@ -588,16 +654,20 @@ var options = {
</tr>
<tr>
<td>zMin</td>
<td>zMax</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the z-axis.</td>
<td>from data</td>
<td>The maximum value for the z-axis.
If not set, the largest value for z in the data set is used.
</td>
</tr>
<tr>
<td>zMax</td>
<td>zMin</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the z-axis.</td>
<td>from data</td>
<td>The minimum value for the z-axis.
If not set, the smallest value for z in the data set is used.
</td>
</tr>
<tr>
<td>zStep</td>
@ -796,4 +866,4 @@ graph3d.on('cameraPositionChange', onCameraPositionChange);
<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
- 1
docs/network/configure.html View File

@ -59,7 +59,6 @@
<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>

+ 318
- 9
docs/network/edges.html View File

@ -59,7 +59,6 @@
<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>
@ -115,11 +114,12 @@
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,
chosen: true,
color: {
color:'#848484',
highlight:'#848484',
@ -135,7 +135,37 @@ var options = {
background: 'none',
strokeWidth: 2, // px
strokeColor: '#ffffff',
align:'horizontal'
align: 'horizontal',
multi: false,
vadjust: 0,
bold: {
color: '#343434',
size: 14, // px
face: 'arial',
vadjust: 0,
mod: 'bold'
},
ital: {
color: '#343434',
size: 14, // px
face: 'arial',
vadjust: 0,
mod: 'italic',
},
boldital: {
color: '#343434',
size: 14, // px
face: 'arial',
vadjust: 0,
mod: 'bold italic'
},
mono: {
color: '#343434',
size: 15, // px
face: 'courier new',
vadjust: 2,
mod: ''
}
},
hidden: false,
hoverWidth: 1.5,
@ -178,8 +208,9 @@ var options = {
roundness: 0.5
},
title:undefined,
value: undefined,
width: 1,
value: undefined
widthConstraint: false
}
}
@ -243,6 +274,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>
@ -261,6 +298,101 @@ network.setOptions(options);
<td><code>true</code></td>
<td>When false, the edge stops at the arrow. This can be useful if you have thick lines and you want the arrow to end in a point. Middle arrows are not affected by this.</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','chosen', this);">
<td><span parent="chosen" class="right-caret"></span> chosen</td>
<td>Object or Boolean</td>
<td><code>true</code></td>
<td>
When true, selecting or hovering on an edge will change it and its label's characteristics according the default.
When false, no change to the edge or its label will occur when the edge is chosen.
If an object is supplied, finer-grained adjustment of edge and label characteristics is available when an edge is chosen.
</td>
</tr>
<tr parent="chosen" class="hidden">
<td class="indent">chosen.edge</td>
<td>Function or Boolean</td>
<td>undefined</td>
<td>
When true, selecting or hovering on an edge will change its characteristics according the default.
When false, no change to the edge will occur when the edge is chosen.
<p>
If a function is supplied, it is called when the edge is chosen.
<pre class="code">
function(values, id, selected, hovering) {
values.<i>property</i> = <i>chosenValue</i>;
}</pre>
</p>
<p>
Any of the incoming arguments may be used to determine characteristic changes.
If a property is not specifically assigned by the supplied function, it will be left unchanged.
A specific function may be assigned to each particular edge in its options, or to all in the network's <code>edges</code> options.
</p>
<p>
The properties define the characteristics that can be changed as follows:
</p>
<table>
<tr><th>Property</th><th>Edge Reference</th></tr>
<tr><td>dashes</td><td>see dashes</td></tr>
<tr><td>toArrow</td><td>see arrows.to.enabled</td></tr>
<tr><td>toArrowScale</td><td>see arrows.to.scaleFactor</td></tr>
<tr><td>toArrowType</td><td>see arrows.to.type</td></tr>
<tr><td>middleArrow</td><td>see arrows.middle.enabled</td></tr>
<tr><td>middleArrowScale</td><td>see arrows.middle.scaleFactor</td></tr>
<tr><td>middleArrowType</td><td>see arrows.middle.type</td></tr>
<tr><td>fromArrow</td><td>see arrows.from.enabled</td></tr>
<tr><td>fromArrowScale</td><td>see arrows.from.scaleFactor</td></tr>
<tr><td>fromArrowType</td><td>see arrows.from.type</td></tr>
<tr><td>arrowStrikethrough</td><td>see arrowStrikethrough</td></tr>
<tr><td>color</td><td>see color.color</td></tr>
<tr><td>inheritsColor</td><td>see color.inherit</td></tr>
<tr><td>opacity</td><td>see color.opacity</td></tr>
<tr><td>hidden</td><td>see hidden</td></tr>
<tr><td>length</td><td>see length</td></tr>
<tr><td>shadow</td><td>see shadow.enabled</td></tr>
<tr><td>shadowColor</td><td>see shadow.color</td></tr>
<tr><td>shadowSize</td><td>see shadow.size</td></tr>
<tr><td>shadowX</td><td>see shadow.x</td></tr>
<tr><td>shadowY</td><td>see shadow.y</td></tr>
<tr><td>width</td><td>see width</td></tr>
</table>
<br/>
</td>
</tr>
<tr parent="chosen" class="hidden">
<td class="indent">chosen.label</td>
<td>Function or Boolean</td>
<td>undefined</td>
<td>
When true, selecting or hovering on an edge will change its label's characteristics according the default.
When false, no change to the edge's label will occur when the edge is chosen.
<p>
If a function is supplied, it is called when the edge is chosen.
<pre class="code">
function(values, id, selected, hovering) {
values.<i>property</i> = <i>chosenValue</i>;
}</pre>
</p>
<p>
Any of the incoming arguments may be used to determine characteristic changes.
If a property is not specifically assigned by the supplied function, it will be left unchanged.
A specific function may be assigned to each particular edge in its options, or to all in the network's <code>edges</code> options.
</p>
<p>
The properties define the characteristics that can be changed as follows:
</p>
<table>
<tr><th>Property</th><th>Edge Reference</th></tr>
<tr><td>color</td><td>see font.color</td></tr>
<tr><td>size</td><td>see font.size</td></tr>
<tr><td>face</td><td>see font.face</td></tr>
<tr><td>mod</td><td>font modifier ('bold', 'italic', etc.)</td></tr>
<tr><td>vadjust</td><td>see font.vadjust</td></tr>
<tr><td>strokeWidth</td><td>see font.strokeWidth</td></tr>
<tr><td>strokeColor</td><td>see font.strokeColor</td></tr>
</table>
<br/>
</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','color', this);">
<td><span parent="color" class="right-caret"></span> color</td>
<td>Object or String</td>
@ -274,7 +406,7 @@ network.setOptions(options);
<td class="indent">color.color</td>
<td>String</td>
<td><code>'#848484'</code></td>
<td>The color of the border of the node when it is not selected or hovered over <i>(assuming hover is
<td>The color of the edge when it is not selected or hovered over <i>(assuming hover is
enabled in the interaction module)</i>.
</td>
</tr>
@ -384,6 +516,171 @@ network.setOptions(options);
the label will align itself according to the edge.
</td>
</tr>
<tr parent="font" class="hidden">
<td class="indent">font.vadjust</td>
<td>String</td>
<td><code>0</code></td>
<td>A font-specific correction to the vertical positioning of the base font in the label text. (Positive is down.)</td>
</tr>
<tr parent="font" class="hidden">
<td class="indent">font.multi</td>
<td>Boolean or String</td>
<td><code>false</code></td>
<td>If <code>false</code>, the label is treated as pure text drawn with the base font. If <code>true</code> or <code>'html'</code> the label may be multifonted, with bold, italic and code markup, interpreted as html. If the value is <code>'markdown'</code> or <code>'md'</code> the label may be multifonted, with bold, italic and code markup, interpreted as markdown.
The bold, italic, bold-italic and monospaced fonts may be set up under in the font.bold, font.ital, font.boldital and font.mono properties, respectively.</td>
</tr>
<tr parent="font" class='hidden toggle collapsible' onclick="toggleTable('optionTable','bold', this);">
<td><span parent="bold" class="right-caret"></span> font.bold</td>
<td>Object or String</td>
<td><code>false</code></td>
<td>This object defines the details of the bold font in the label. A shorthand is also supported in the form <code>'size face
color'</code> for example: <code>'14px arial red'</code>.
</td>
</tr>
<tr parent="bold" class="hidden">
<td class="indent">font.bold.color</td>
<td>String</td>
<td><code>'#343434'</code></td>
<td>Color of the bold font in the label text. Defaults to the base font's color.</td>
</tr>
<tr parent="bold" class="hidden">
<td class="indent">font.bold.size</td>
<td>Number</td>
<td><code>14</code></td>
<td>Size of the bold font in the label text. Defaults to the base font's size.</td>
</tr>
<tr parent="bold" class="hidden">
<td class="indent">font.bold.face</td>
<td>String</td>
<td><code>'arial'</code></td>
<td>Font face (or font family) of the bold font in the label text. Defaults to the base font's face.</td>
</tr>
<tr parent="bold" class="hidden">
<td class="indent">font.bold.mod</td>
<td>String</td>
<td><code>'bold'</code></td>
<td>A string added to the face and size when determining the bold font in the label text.</td>
</tr>
<tr parent="bold" class="hidden">
<td class="indent">font.bold.vadjust</td>
<td>String</td>
<td><code>0</code></td>
<td>A font-specific correction to the vertical positioning of the bold italic font in the label text. (Positive is down.) Defaults to the base font's valign.</td>
</tr>
<tr parent="font" class='hidden toggle collapsible' onclick="toggleTable('optionTable','ital', this);">
<td><span parent="ital" class="right-caret"></span> font.ital</td>
<td>Object or String</td>
<td><code>false</code></td>
<td>This object defines the details of the italic font in the label. A shorthand is also supported in the form <code>'size face
color'</code> for example: <code>'14px arial red'</code>.
</td>
</tr>
<tr parent="ital" class="hidden">
<td class="indent">font.ital.color</td>
<td>String</td>
<td><code>'#343434'</code></td>
<td>Color of the italic font in the label text. Defaults to the base font's color.</td>
</tr>
<tr parent="ital" class="hidden">
<td class="indent">font.ital.size</td>
<td>Number</td>
<td><code>14</code></td>
<td>Size of the italic font in the label text. Defaults to the base font's size.</td>
</tr>
<tr parent="ital" class="hidden">
<td class="indent">font.ital.face</td>
<td>String</td>
<td><code>'arial'</code></td>
<td>Font face (or font family) of the italic font in the label text. Defaults to the base font's face.</td>
</tr>
<tr parent="ital" class="hidden">
<td class="indent">font.ital.mod</td>
<td>String</td>
<td><code>'italic'</code></td>
<td>A string added to the face and size when determining the italic font in the label text.</td>
</tr>
<tr parent="ital" class="hidden">
<td class="indent">font.ital.vadjust</td>
<td>String</td>
<td><code>0</code></td>
<td>A font-specific correction to the vertical positioning of the italic font in the label text. (Positive is down.) Defaults to the base font's valign.</td>
</tr>
<tr parent="font" class='hidden toggle collapsible' onclick="toggleTable('optionTable','boldital', this);">
<td><span parent="boldital" class="right-caret"></span> font.boldital</td>
<td>Object or String</td>
<td><code>false</code></td>
<td>This object defines the details of the bold italic font in the label. A shorthand is also supported in the form <code>'size face
color'</code> for example: <code>'14px arial red'</code>.
</td>
</tr>
<tr parent="boldital" class="hidden">
<td class="indent">font.boldital.color</td>
<td>String</td>
<td><code>'#343434'</code></td>
<td>Color of the bold italic font in the label text. Defaults to the base font's color.</td>
</tr>
<tr parent="boldital" class="hidden">
<td class="indent">font.boldital.size</td>
<td>Number</td>
<td><code>14</code></td>
<td>Size of the bold italic font in the label text. Defaults to the base font's size.</td>
</tr>
<tr parent="boldital" class="hidden">
<td class="indent">font.boldital.face</td>
<td>String</td>
<td><code>'arial'</code></td>
<td>Font face (or font family) of the bold italic font in the label text. Defaults to the base font's face.</td>
</tr>
<tr parent="boldital" class="hidden">
<td class="indent">font.boldital.mod</td>
<td>String</td>
<td><code>'bold'</code></td>
<td>A string added to the face and size when determining the bold italic font in the label text.</td>
</tr>
<tr parent="boldital" class="hidden">
<td class="indent">font.boldital.vadjust</td>
<td>String</td>
<td><code>0</code></td>
<td>A font-specific correction to the vertical positioning of the bold italic font in the label text. (Positive is down.) Defaults to the base font's valign.</td>
</tr>
<tr parent="font" class='hidden toggle collapsible' onclick="toggleTable('optionTable','mono', this);">
<td><span parent="mono" class="right-caret"></span> font.mono</td>
<td>Object or String</td>
<td><code>false</code></td>
<td>This object defines the details of the monospaced font in the label. A shorthand is also supported in the form <code>'size face
color'</code> for example: <code>'15px courier red'</code>.
</td>
</tr>
<tr parent="mono" class="hidden">
<td class="indent">font.mono.color</td>
<td>String</td>
<td><code>'#343434'</code></td>
<td>Color of the monospaced font in the label text. Defaults to the base font's color.</td>
</tr>
<tr parent="mono" class="hidden">
<td class="indent">font.mono.size</td>
<td>Number</td>
<td><code>15</code></td>
<td>Size of the monospaced font in the label text. Defaults to the base font's size.</td>
</tr>
<tr parent="mono" class="hidden">
<td class="indent">font.mono.face</td>
<td>String</td>
<td><code>'courier new'</code></td>
<td>Font face (or font family) of the monospaced font in the label text.</td>
</tr>
<tr parent="mono" class="hidden">
<td class="indent">font.mono.mod</td>
<td>String</td>
<td><code>''</code></td>
<td>A string added to the face and size when determining the monospaced font in the label text.</td>
</tr>
<tr parent="mono" class="hidden">
<td class="indent">font.mono.vadjust</td>
<td>String</td>
<td><code>2</code></td>
<td>A font-specific correction to the vertical positioning of the monospaced font in the label text. (Positive is down.) Defaults to the base font's valign.</td>
</tr>
<tr>
<td>from</td>
<td>Number or String</td>
@ -637,7 +934,7 @@ var options: {
<td>String</td>
<td><code>'dynamic'</code></td>
<td>Possible options: <code>'dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal',
'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'</code>. Take a look at our example 26 to see what these look like
'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'</code>. Take a look at <a href="http://visjs.org/examples/network/edgeStyles/smooth.html">this example</a> to see what these look like
and pick the one that you like best!
<br><br>
When using dynamic, the edges will have an invisible support node guiding the shape. This node is part of the
@ -685,6 +982,18 @@ var options: {
<td><code>1</code></td>
<td>The width of the edge. If value is set, this is not used.</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','widthConstraint', this);">
<td><span parent="widthConstraint" class="right-caret"></span> widthConstraint</td>
<td>Number, Boolean or Object</td>
<td><code>false</code></td>
<td>If false, no widthConstraint is applied. If a number is specified, the maximum width of the edge's label is set to the value. The edge's label's lines will be broken on spaces to stay below the maximum.</td>
</tr>
<tr parent="widthConstraint" class="hidden">
<td class="indent">widthConstraint.maximum</td>
<td>Number</td>
<td><code>undefined</code></td>
<td>If a number is specified, the maximum width of the edge's label is set to the value. The edge's label's lines will be broken on spaces to stay below the maximum.</td>
</tr>
</table>
</div>
@ -703,4 +1012,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>

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

@ -57,7 +57,6 @@
<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>
@ -174,4 +173,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>

+ 95
- 24
docs/network/index.html View File

@ -88,7 +88,6 @@
<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>
@ -210,7 +209,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>
@ -315,19 +327,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>
@ -420,7 +436,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);">
@ -485,7 +501,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);">
@ -532,7 +548,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);">
@ -607,6 +623,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>)
@ -649,7 +708,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);">
@ -666,7 +725,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);">
@ -727,7 +786,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);">
@ -825,7 +884,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);">
@ -856,7 +915,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);">
@ -942,7 +1001,7 @@ function releaseFunction (clusterPosition, containedNodesPositions) {
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','setSelection', this);">
<td colspan="2"><span parent="setSelection" class="right-caret" id="method_setSelection"></span> setSelection(
<code>Object selection</code>,
<code>Object selection</code>,
<code>[Object options]</code>)</td>
</tr>
<tr class="hidden" parent="setSelection">
@ -971,7 +1030,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);">
@ -1083,7 +1142,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);">
@ -1181,7 +1240,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>
@ -1334,8 +1399,14 @@ var options = {
<td>Fired if the option <code>interaction:{hover:true}</code> is enabled and the mouse moved away from an edge it was hovering over before.</td>
</tr>
<tr><td id="event_zoom">zoom</td>
<td><code>{direction:'+'/'-', scale: Number}</code></td>
<td>Fired when the user zooms in or out. The properties tell you which direction the zoom is in. The scale is a number greater than 0, which is the same that you get with network.getScale().</td>
<td>Object</td>
<td>Fired when the user zooms in or out. The properties tell you which direction the zoom is in. The scale is a number greater than 0, which is the same that you get with network.getScale(). When fired by clicking the zoom in or zoom out navigation buttons, the pointer property of the object passed will be null. Passes an object with properties structured as:
<pre class="prettyprint lang-js">{
direction: '+'/'-',
scale: Number,
pointer: {x:pointer_x, y:pointer_y}
}
</pre></td>
</tr>
<tr><td id="event_showPopup">showPopup</td>
<td><code>id of item corresponding to popup</code></td>

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

@ -52,7 +52,6 @@
<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>
@ -169,4 +168,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>

+ 3
- 4
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();">
@ -56,7 +56,6 @@
<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>
@ -166,4 +165,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
- 3
docs/network/manipulation.html View File

@ -52,7 +52,6 @@
<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>
@ -164,7 +163,7 @@ var options = {
</pre>
This example code will show a popup if you connect a node to itself to ask you if that was what you wanted. If you do not want the edge created, do not call the callback function or call the callback function <code>null</code> or no argument.</td></tr>
<tr><td>editNode</td> <td>Function</td> <td><code>undefined</code></td> <td>Editing of nodes is only possible when a handling function is supplied. If this is not the case, editing of nodes will be disabled. The function will be called when a node is selected and the 'Edit Node' button on the toolbar is pressed. This function will be called like the <code>addNode</code> function with the node's data and a callback function.</td></tr>
<tr><td>editEdge</td> <td>Boolean or Function</td> <td><code>true</code></td> <td>If boolean, toggle the editing of edges in the GUI. When a function is supplied, it will be called when an edge is selected and the 'Edit Edge' button on the toolbar is pressed. This function will be called in the same way the <code>addEdge</code> function was called. If the callback is not performed, the edge will remain hanging where it was released. <b>To cancel, call the callback function with <code>null</code> as argument or without arguments</b>.</td></tr>
<tr><td>editEdge</td> <td>Boolean or Function</td> <td><code>true</code></td> <td>If boolean, toggle the editing of edges in the GUI. If a function is supplied, it will be called when an edge is selected and the 'Edit Edge' button on the toolbar is pressed. Initially, the endpoints of the edge may be dragged to connect to a different node, then the function will be called in the same way the <code>addEdge</code> function is called. If an object, if a function is given for the <code>'editWithoutDrag'</code> property, the function will be called immediately (without dragging any endpoints) in the same way the <code>addEdge</code> function is called. If the callback is not performed, the edge will remain hanging where it was released. <b>To cancel, call the callback function with <code>null</code> as argument or without arguments</b>.</td></tr>
<tr><td>deleteNode</td> <td>Boolean or Function</td> <td><code>true</code></td> <td>If boolean, toggle the deletion of nodes in the GUI. If function, it will be called when a node is selected and the 'Delete selected' button is pressed. When using a function, it will receive a callback and an object with an array of selected nodeIds and an array of selected edges Ids. These are the items that will be deleted if the callback is performed.</td></tr>
<tr><td>deleteEdge</td> <td>Boolean or Function</td> <td><code>true</code></td> <td>If boolean, toggle the deletion of edges in the GUI. If function, it will be called when an edge is selected and the 'Delete selected' button is pressed. When using a function, it will receive a callback and an object with an array of selected nodeIds (empty) and an array of selected edges Ids. These are the items that will be deleted if the callback is performed.</td></tr>
<tr><td>controlNodeStyle</td> <td>Object</td> <td>Object</td><td>You can supply any styling information you'd like here. All fields described in <a href="./nodes.html">the nodes module</a> are allowed except obviously for id, x, y and fixed. <br><br>Default:
@ -201,4 +200,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>

+ 368
- 6
docs/network/nodes.html View File

@ -53,7 +53,6 @@
<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>
@ -110,6 +109,7 @@ var options = {
borderWidth: 1,
borderWidthSelected: 2,
brokenImage:undefined,
chosen: true,
color: {
border: '#2B7CE9',
background: '#97C2FC',
@ -133,9 +133,40 @@ var options = {
background: 'none',
strokeWidth: 0, // px
strokeColor: '#ffffff',
align: 'center'
align: 'center',
multi: false,
vadjust: 0,
bold: {
color: '#343434',
size: 14, // px
face: 'arial',
vadjust: 0,
mod: 'bold'
},
ital: {
color: '#343434',
size: 14, // px
face: 'arial',
vadjust: 0,
mod: 'italic',
},
boldital: {
color: '#343434',
size: 14, // px
face: 'arial',
vadjust: 0,
mod: 'bold italic'
},
mono: {
color: '#343434',
size: 15, // px
face: 'courier new',
vadjust: 2,
mod: ''
}
},
group: undefined,
heightConstraint: false,
hidden: false,
icon: {
face: 'FontAwesome',
@ -187,6 +218,7 @@ var options = {
size: 25,
title: undefined,
value: undefined,
widthConstraint: false,
x: undefined,
y: undefined
}
@ -239,6 +271,90 @@ network.setOptions(options);
a backup image in case the URL supplied in the image option cannot be resolved.
</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','chosen', this);">
<td><span parent="chosen" class="right-caret"></span> chosen</td>
<td>Object or Boolean</td>
<td><code>true</code></td>
<td>
When true, selecting or hovering on a node will change it and its label's characteristics according the default.
When false, no change to the node or its label will occur when the node is chosen.
If an object is supplied, finer-grained adjustment of node and label characteristics is available when a node is chosen.
</td>
</tr>
<tr parent="chosen" class="hidden">
<td class="indent">chosen.node</td>
<td>Function or Boolean</td>
<td>undefined</td>
<td>
When true, selecting or hovering on a node will change its characteristics according the default.
When false, no change to the node will occur when the node is chosen.
<p>
If a function is supplied, it is called when the node is chosen.
<pre class="code">
function(values, id, selected, hovering) {
values.<i>property</i> = <i>chosenValue</i>;
}</pre>
</p>
<p>
Any of the incoming arguments may be used to determine characteristic changes.
If a property is not specifically assigned by the supplied function, it will be left unchanged.
A specific function may be assigned to each particular node in its options, or to all in the network's <code>nodes</code> options.
</p>
<p>
The properties define the characteristics that can be changed as follows:
</p>
<table>
<tr><th>Property</th><th>Node Reference</th></tr>
<tr><td>color</td><td>see color.background</td></tr>
<tr><td>borderWidth</td><td>see borderWidth</td></tr>
<tr><td>borderColor</td><td>see color.border</td></tr>
<tr><td>size</td><td>see size</td></tr>
<tr><td>borderDashes</td><td>see shapeProperties.borderDashes</td></tr>
<tr><td>borderRadius</td><td>see shapeProperties.borderRadius</td></tr>
<tr><td>shadow</td><td>see shadow.enabled</td></tr>
<tr><td>shadowColor</td><td>see shadow.color</td></tr>
<tr><td>shadowSize</td><td>see shadow.size</td></tr>
<tr><td>shadowX</td><td>see shadow.x</td></tr>
<tr><td>shadowY</td><td>see shadow.y</td></tr>
</table>
<br/>
</td>
</tr>
<tr parent="chosen" class="hidden">
<td class="indent">chosen.label</td>
<td>Function or Boolean</td>
<td>undefined</td>
<td>
When true, selecting or hovering on a node will change its label's characteristics according the default.
When false, no change to the node's label will occur when the node is chosen.
<p>
If a function is supplied, it is called when the node is chosen.
<pre class="code">
function(values, id, selected, hovering) {
values.<i>property</i> = <i>chosenValue</i>;
}</pre>
</p>
<p>
Any of the incoming arguments may be used to determine characteristic changes.
If a property is not specifically assigned by the supplied function, it will be left unchanged.
A specific function may be assigned to each particular node in its options, or to all in the network's <code>nodes</code> options.
</p>
<p>
The properties define the characteristics that can be changed as follows:
</p>
<table>
<tr><th>Property</th><th>Node Reference</th></tr>
<tr><td>color</td><td>see font.color</td></tr>
<tr><td>size</td><td>see font.size</td></tr>
<tr><td>face</td><td>see font.face</td></tr>
<tr><td>mod</td><td>font modifier ('bold', 'italic', etc.)</td></tr>
<tr><td>vadjust</td><td>see font.vadjust</td></tr>
<tr><td>strokeWidth</td><td>see font.strokeWidth</td></tr>
<tr><td>strokeColor</td><td>see font.strokeColor</td></tr>
</table>
<br/>
</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','color', this);">
<td><span parent="color" class="right-caret"></span> color</td>
<td>Object or String</td>
@ -381,14 +497,198 @@ network.setOptions(options);
<td>This can be set to 'left' to make the label left-aligned. Otherwise,
defaults to 'center'.</td>
</tr>
<tr parent="font" class="hidden">
<td class="indent">font.vadjust</td>
<td>String</td>
<td><code>0</code></td>
<td>A font-specific correction to the vertical positioning of the base font in the label text. (Positive is down.)</td>
</tr>
<tr parent="font" class="hidden">
<td class="indent">font.multi</td>
<td>Boolean or String</td>
<td><code>false</code></td>
<td>If <code>false</code>, the label is treated as pure text drawn with the base font. If <code>true</code> or <code>'html'</code> the label may be multifonted, with bold, italic and code markup, interpreted as html. If the value is <code>'markdown'</code> or <code>'md'</code> the label may be multifonted, with bold, italic and code markup, interpreted as markdown.
The bold, italic, bold-italic and monospaced fonts may be set up under in the font.bold, font.ital, font.boldital and font.mono properties, respectively.</td>
</tr>
<tr parent="font" class='hidden toggle collapsible' onclick="toggleTable('optionTable','bold', this);">
<td><span parent="bold" class="right-caret"></span> font.bold</td>
<td>Object or String</td>
<td><code>false</code></td>
<td>This object defines the details of the bold font in the label. A shorthand is also supported in the form <code>'size face
color'</code> for example: <code>'14px arial red'</code>.
</td>
</tr>
<tr parent="bold" class="hidden">
<td class="indent">font.bold.color</td>
<td>String</td>
<td><code>'#343434'</code></td>
<td>Color of the bold font in the label text. Defaults to the base font's color.</td>
</tr>
<tr parent="bold" class="hidden">
<td class="indent">font.bold.size</td>
<td>Number</td>
<td><code>14</code></td>
<td>Size of the bold font in the label text. Defaults to the base font's size.</td>
</tr>
<tr parent="bold" class="hidden">
<td class="indent">font.bold.face</td>
<td>String</td>
<td><code>'arial'</code></td>
<td>Font face (or font family) of the bold font in the label text. Defaults to the base font's face.</td>
</tr>
<tr parent="bold" class="hidden">
<td class="indent">font.bold.mod</td>
<td>String</td>
<td><code>'bold'</code></td>
<td>A string added to the face and size when determining the bold font in the label text.</td>
</tr>
<tr parent="bold" class="hidden">
<td class="indent">font.bold.vadjust</td>
<td>String</td>
<td><code>0</code></td>
<td>A font-specific correction to the vertical positioning of the bold italic font in the label text. (Positive is down.) Defaults to the base font's valign.</td>
</tr>
<tr parent="font" class='hidden toggle collapsible' onclick="toggleTable('optionTable','ital', this);">
<td><span parent="ital" class="right-caret"></span> font.ital</td>
<td>Object or String</td>
<td><code>false</code></td>
<td>This object defines the details of the italic font in the label. A shorthand is also supported in the form <code>'size face
color'</code> for example: <code>'14px arial red'</code>.
</td>
</tr>
<tr parent="ital" class="hidden">
<td class="indent">font.ital.color</td>
<td>String</td>
<td><code>'#343434'</code></td>
<td>Color of the italic font in the label text. Defaults to the base font's color.</td>
</tr>
<tr parent="ital" class="hidden">
<td class="indent">font.ital.size</td>
<td>Number</td>
<td><code>14</code></td>
<td>Size of the italic font in the label text. Defaults to the base font's size.</td>
</tr>
<tr parent="ital" class="hidden">
<td class="indent">font.ital.face</td>
<td>String</td>
<td><code>'arial'</code></td>
<td>Font face (or font family) of the italic font in the label text. Defaults to the base font's face.</td>
</tr>
<tr parent="ital" class="hidden">
<td class="indent">font.ital.mod</td>
<td>String</td>
<td><code>'italic'</code></td>
<td>A string added to the face and size when determining the italic font in the label text.</td>
</tr>
<tr parent="ital" class="hidden">
<td class="indent">font.ital.vadjust</td>
<td>String</td>
<td><code>0</code></td>
<td>A font-specific correction to the vertical positioning of the italic font in the label text. (Positive is down.) Defaults to the base font's valign.</td>
</tr>
<tr parent="font" class='hidden toggle collapsible' onclick="toggleTable('optionTable','boldital', this);">
<td><span parent="boldital" class="right-caret"></span> font.boldital</td>
<td>Object or String</td>
<td><code>false</code></td>
<td>This object defines the details of the bold italic font in the label. A shorthand is also supported in the form <code>'size face
color'</code> for example: <code>'14px arial red'</code>.
</td>
</tr>
<tr parent="boldital" class="hidden">
<td class="indent">font.boldital.color</td>
<td>String</td>
<td><code>'#343434'</code></td>
<td>Color of the bold italic font in the label text. Defaults to the base font's color.</td>
</tr>
<tr parent="boldital" class="hidden">
<td class="indent">font.boldital.size</td>
<td>Number</td>
<td><code>14</code></td>
<td>Size of the bold italic font in the label text. Defaults to the base font's size.</td>
</tr>
<tr parent="boldital" class="hidden">
<td class="indent">font.boldital.face</td>
<td>String</td>
<td><code>'arial'</code></td>
<td>Font face (or font family) of the bold italic font in the label text. Defaults to the base font's face.</td>
</tr>
<tr parent="boldital" class="hidden">
<td class="indent">font.boldital.mod</td>
<td>String</td>
<td><code>'bold'</code></td>
<td>A string added to the face and size when determining the bold italic font in the label text.</td>
</tr>
<tr parent="boldital" class="hidden">
<td class="indent">font.boldital.vadjust</td>
<td>String</td>
<td><code>0</code></td>
<td>A font-specific correction to the vertical positioning of the bold italic font in the label text. (Positive is down.) Defaults to the base font's valign.</td>
</tr>
<tr parent="font" class='hidden toggle collapsible' onclick="toggleTable('optionTable','mono', this);">
<td><span parent="mono" class="right-caret"></span> font.mono</td>
<td>Object or String</td>
<td><code>false</code></td>
<td>This object defines the details of the monospaced font in the label. A shorthand is also supported in the form <code>'size face
color'</code> for example: <code>'15px courier red'</code>.
</td>
</tr>
<tr parent="mono" class="hidden">
<td class="indent">font.mono.color</td>
<td>String</td>
<td><code>'#343434'</code></td>
<td>Color of the monospaced font in the label text. Defaults to the base font's color.</td>
</tr>
<tr parent="mono" class="hidden">
<td class="indent">font.mono.size</td>
<td>Number</td>
<td><code>15</code></td>
<td>Size of the monospaced font in the label text. Defaults to the base font's size.</td>
</tr>
<tr parent="mono" class="hidden">
<td class="indent">font.mono.face</td>
<td>String</td>
<td><code>'courier new'</code></td>
<td>Font face (or font family) of the monospaced font in the label text.</td>
</tr>
<tr parent="mono" class="hidden">
<td class="indent">font.mono.mod</td>
<td>String</td>
<td><code>''</code></td>
<td>A string added to the face and size when determining the monospaced font in the label text.</td>
</tr>
<tr parent="mono" class="hidden">
<td class="indent">font.mono.vadjust</td>
<td>String</td>
<td><code>2</code></td>
<td>A font-specific correction to the vertical positioning of the monospaced font in the label text. (Positive is down.) Defaults to the base font's valign.</td>
</tr>
<tr>
<td>group</td>
<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 class='toggle collapsible' onclick="toggleTable('optionTable','heightConstraint', this);">
<td><span parent="heightConstraint" class="right-caret"></span> heightConstraint</td>
<td>Number, Boolean or Object</td>
<td><code>false</code></td>
<td>If false, no heightConstraint is applied. If a number is specified, the value is used as the minimum height of the node. The node's height will be be set to the minimum if less than the value.</td>
</tr>
<tr parent="heightConstraint" class="hidden">
<td class="indent">heightConstraint.minimum</td>
<td>Number</td>
<td><code>undefined</code></td>
<td>If a number is specified, the value is used as the minimum height of the node. The node's height will be be set to the minimum if less than the value.</td>
</tr>
<tr parent="heightConstraint" class="hidden">
<td class="indent">heightConstraint.valign</td>
<td>String</td>
<td><code>'middle'</code></td>
<td>Valid values are <code>'top'</code>, <code>'middle'</code>, and <code>'bottom'</code>.
When specified, if the height of the label text is less than the minimum (including any top or bottom margins), it will be offset vertically to the designated position.</td>
</tr>
<tr>
<td>hidden</td>
<td>Boolean</td>
@ -433,14 +733,28 @@ network.setOptions(options);
<td><code>undefined</code></td>
<td>The id of the node. The id is mandatory for nodes and they have to be unique. This should obviously be set per node, not globally.</td>
</tr>
<tr>
<td>image</td>
<td>String</td>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','image', this);">
<td><span parent="image" class="right-caret"></span> image</td>
<td>Object or String</td>
<td><code>undefined</code></td>
<td>When the shape is set to <code>image</code> or <code>circularImage</code>, this option should be the URL
to an image. If the image cannot be found, the brokenImage option can be used.
</td>
</tr>
<tr parent="image" class="hidden">
<td class="indent">image.unselected</td>
<td>String</td>
<td><code>undefined</code></td>
<td>Unselected (default) image URL.
</td>
</tr>
<tr parent="image" class="hidden">
<td class="indent">image.selected</td>
<td>String</td>
<td><code>undefined</code></td>
<td>Selected image URL.
</td>
</tr>
<tr>
<td>label</td>
<td>String</td>
@ -459,6 +773,36 @@ network.setOptions(options);
<td><code>undefined</code></td>
<td>When using the hierarchical layout, the level determines where the node is going to be positioned.</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','margin', this);">
<td><span parent="margin" class="right-caret"></span> margin</td>
<td>Object or Number</td>
<td><code>5</code></td>
<td>If a number is specified, the margins of the label are set to that value on all sides. These options are only used when the shape is set to <code>box</code>, <code>circle</code>, <code>database</code>, <code>icon</code> or <code>text</code>.</td>
</tr>
<tr parent="margin" class="hidden">
<td class="indent">margin.top</td>
<td>Number</td>
<td><code>5</code></td>
<td>The top margin of the label is set to this value.</td>
</tr>
<tr parent="margin" class="hidden">
<td class="indent">margin.right</td>
<td>Number</td>
<td><code>5</code></td>
<td>The right margin of the label is set to this value.</td>
</tr>
<tr parent="margin" class="hidden">
<td class="indent">margin.bottom</td>
<td>Number</td>
<td><code>5</code></td>
<td>The bottom margin of the label is set to this value.</td>
</tr>
<tr parent="margin" class="hidden">
<td class="indent">margin.left</td>
<td>Number</td>
<td><code>5</code></td>
<td>The left margin of the label is set to this value.</td>
</tr>
<tr>
<td>mass</td>
<td>Number</td>
@ -701,6 +1045,24 @@ mySize = minSize + diff * scale;
<td>When a value is set, the nodes will be scaled using the options in the scaling object defined above.
</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','widthConstraint', this);">
<td><span parent="widthConstraint" class="right-caret"></span> widthConstraint</td>
<td>Number, Boolean or Object</td>
<td><code>false</code></td>
<td>If false, no widthConstraint is applied. If a number is specified, the minimum and maximum widths of the node are set to the value. The node's label's lines will be broken on spaces to stay below the maximum and the node's width will be set to the minimum if less than the value.</td>
</tr>
<tr parent="widthConstraint" class="hidden">
<td class="indent">widthConstraint.minimum</td>
<td>Number</td>
<td><code>undefined</code></td>
<td>If a number is specified, the minimum width of the node is set to the value. The node's width will be set to the minimum if less than the value.</td>
</tr>
<tr parent="widthConstraint" class="hidden">
<td class="indent">widthConstraint.maximum</td>
<td>Number</td>
<td><code>undefined</code></td>
<td>If a number is specified, the maximum width of the node is set to the value. The node's label's lines will be broken on spaces to stay below the maximum.</td>
</tr>
<tr>
<td>x</td>
<td>Number</td>

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

@ -53,7 +53,6 @@
<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>
@ -221,4 +220,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
- 211
docs/old/old_network/canvas.html View File

@ -1,211 +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="../featureRequests.html">Feature requests</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
- 182
docs/old/old_network/clustering.html View File

@ -1,182 +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="../featureRequests.html">Feature requests</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
- 127
docs/old/old_network/rendering.html View File

@ -1,127 +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/featureRequests.html">Feature requests</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
- 135
docs/old/old_network/selection.html View File

@ -1,135 +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/featureRequests.html">Feature requests</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
- 161
docs/old/old_network/view.html View File

@ -1,161 +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/featureRequests.html">Feature requests</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


+ 274
- 43
docs/timeline/index.html View File

@ -31,13 +31,13 @@
<script language="JavaScript">
smoothScroll.init();
</script>
<!-- Tipue vendor css -->
<link href="../css/tipuesearch.css" rel="stylesheet">
<!-- Tipue vendor css -->
<link href="../css/tipuesearch.css" rel="stylesheet">
<script type="text/javascript" src="../js/toggleTable.js"></script>
</head>
<body onload="prettyPrint();">
@ -60,7 +60,6 @@
<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>
@ -162,8 +161,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>
@ -213,7 +212,7 @@
or a DataView (offering 1 way data binding).
Items are regular objects and can contain the properties <code>start</code>,
<code>end</code> (optional), <code>content</code>,
<code>group</code> (optional), <code>className</code> (optional),
<code>group</code> (optional), <code>className</code> (optional),
<code>editable</code> (optional), and <code>style</code> (optional).
</p>
@ -237,7 +236,7 @@ var items = new vis.DataSet([
The item properties are defined as:
</p>
<table class="properties">
<table class="properties" id="itemOptionTable">
<tr>
<th>Name</th>
<th>Type</th>
@ -324,7 +323,7 @@ var items = new vis.DataSet([
<td>String</td>
<td>none</td>
<td>Add a title for the item, displayed when holding the mouse on the item.
The title can only contain plain text.
The title can be an HTML element or a string containing plain text or HTML.
</td>
</tr>
<tr>
@ -335,11 +334,30 @@ var items = new vis.DataSet([
Types 'box' and 'point' need a start date, the types 'range' and 'background' needs both a start and end date.
</td>
</tr>
<tr>
<td>editable</td>
<td>Boolean</td>
<tr class='toggle collapsible' onclick="toggleTable('itemOptionTable', 'itemEditable', this);">
<td><span parent="itemEditable" class="right-caret"></span> editable</td>
<td>Boolean or Object</td>
<td>no</td>
<td>Override the editable option of the timeline for a specific item (assuming <code>timeline.editable.overrideItems</code> is false).</td>
</tr>
<tr parent="itemEditable" class="hidden">
<td class="indent">editable.remove</td>
<td>boolean</td>
<td>no</td>
<td>If true, item can be deleted by first selecting it, and then clicking the delete button on the top right of the item. See section <a href="#Editing_Items">Editing Items</a> for a detailed explanation.</td>
</tr>
<tr parent="itemEditable" class="hidden">
<td class="indent">editable.updateGroup</td>
<td>boolean</td>
<td>no</td>
<td>If true, item can be dragged from one group to another. Only applicable when the Timeline has groups. See section <a href="#Editing_Items">Editing Items</a> for a detailed explanation.</td>
</tr>
<tr parent="itemEditable" class="hidden">
<td class="indent">editable.updateTime</td>
<td>boolean</td>
<td>no</td>
<td>Override the editable option of the timeline for a specific item.</td>
<td>If true, items can be dragged to another moment in time. See section <a href="#Editing_Items">Editing Items</a> for a detailed explanation.</td>
</tr>
</table>
<h3 id="groups">Groups</h3>
@ -363,7 +381,7 @@ var groups = [
{
id: 1,
content: 'Group 1'
// Optional: a field 'className', 'style'
// Optional: a field 'className', 'style', 'order', [properties]
}
// more groups...
]);
@ -399,9 +417,9 @@ var groups = [
</tr>
<tr>
<td>content</td>
<td>String</td>
<td>String or Element</td>
<td>yes</td>
<td>The contents of the group. This can be plain text or html code.</td>
<td>The contents of the group. This can be plain text, html code or an html element.</td>
</tr>
<tr>
<td>id</td>
@ -436,6 +454,24 @@ var groups = [
The title can only contain plain text.
</td>
</tr>
<tr>
<td>visible</td>
<td>Boolean</td>
<td>no</td>
<td>Provides a means to toggle the whether a group is displayed or not. Defaults to <code>true</code>.</td>
</tr>
<tr>
<td>nestedGroups</td>
<td>Array</td>
<td>no</td>
<td>Array of group ids nested in the group. Nested groups will appear under this nesting group.</td>
</tr>
<tr>
<td>showNestedGroups</td>
<td>Boolean</td>
<td>no</td>
<td>Assuming the group has nested groups, this will set the initial state of the group - shown or collapsed. The <code>showNestedGroups</code> is defaulted to <code>true</code>.</td>
</tr>
</table>
@ -545,6 +581,12 @@ function (option, path) {
<td><code>false</code></td>
<td>If true, items can be dragged to another moment in time. See section <a href="#Editing_Items">Editing Items</a> for a detailed explanation.</td>
</tr>
<tr parent="editable" class="hidden">
<td class="indent">editable.overrideItems</td>
<td>boolean</td>
<td><code>false</code></td>
<td>If true, item specific editable properties are overridden by timeline settings</td>
</tr>
<tr>
<td>end</td>
@ -557,7 +599,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:
@ -583,8 +625,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>
@ -624,7 +674,7 @@ function (option, path) {
If no <code>order</code> properties are provided, the order will be undetermined.
</td>
</tr>
<tr>
<td>groupOrderSwap</td>
<td>Function</td>
@ -640,7 +690,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, a string or a template 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>
@ -667,6 +717,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>
@ -787,7 +846,7 @@ function (option, path) {
Only applicable when option <code>selectable</code> is <code>true</code>.
</td>
</tr>
<tr>
<td style="font-size: 0.9em">multiselectPerGroup</td>
<td>boolean</td>
@ -805,7 +864,7 @@ function (option, path) {
<td>Callback function triggered when an item is about to be added: when the user double taps an empty space in the Timeline. See section <a href="#Editing_Items">Editing Items</a> for more information. Only applicable when both options <code>selectable</code> and <code>editable.add</code> are set <code><code>true</code></code>.
</td>
</tr>
<tr>
<td>onAddGroup</td>
<td>function</td>
@ -829,7 +888,7 @@ function (option, path) {
<td>Callback function triggered when an item has been moved: after the user has dragged the item to an other position. See section <a href="#Editing_Items">Editing Items</a> for more information. Only applicable when both options <code>selectable</code> and <code>editable.updateTime</code> or <code>editable.updateGroup</code> are set <code><code>true</code></code>.
</td>
</tr>
<tr>
<td>onMoveGroup</td>
<td>function</td>
@ -853,7 +912,7 @@ function (option, path) {
<td>Callback function triggered when an item is about to be removed: when the user tapped the delete button on the top right of a selected item. See section <a href="#Editing_Items">Editing Items</a> for more information. Only applicable when both options <code>selectable</code> and <code>editable.remove</code> are set <code><code>true</code></code>.
</td>
</tr>
<tr>
<td>onRemoveGroup</td>
<td>function</td>
@ -895,6 +954,19 @@ 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>rollingMode</td>
<td>boolean</td>
<td><code>false</code></td>
<td>If true, the timeline will initial in a rolling mode - the current time will always be centered. I the user drags the timeline, the timeline will go out of rolling mode and a toggle button will appear. Clicking that button will go back to rolling mode. Zooming in rolling mode will zoom in to the center without consideration of the mouse position.</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>
@ -942,6 +1014,13 @@ function (option, path) {
<td>If true (default), items will be stacked on top of each other such that they do not overlap.</td>
</tr>
<tr>
<td>stackSubgroups</td>
<td>boolean</td>
<td><code>true</code></td>
<td>If true (default), subgroups will be stacked on top of each other such that they do not overlap.</td>
</tr>
<tr>
<td>snap</td>
<td>function or null</td>
@ -964,14 +1043,22 @@ 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>
<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, the item element as the second argument and the edited data as the third argument, and must return HTML code, a string or a template 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>visibleFrameTemplate</td>
<td>function</td>
<td>none</td>
<td>A template function used to generate the visible frame of the items. The function is called by the Timeline with an items' data as the first argument and the item frame element as the second, and must return HTML code, a string or a template 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.
This would be used as an additional way to add content that is constant in size with the visible frame of the item and does not get visibly hidden with the item's internal container: <code>vis-item-overflow</code> which is <code>overflow:hidden</code>.</td>
</tr>
<tr class='depricated'>
<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>This option is <b>DEPRICATED</b> and no longer supported. It will be removed in the next MAJOR release.</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','timeAxis', this);">
@ -1008,6 +1095,51 @@ function (option, path) {
</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','tooltip', this);">
<td><span parent="tooltip" class="right-caret"></span> tooltip</td>
<td>Object</td>
<td><code>Object</code></td>
<td>Specify how the tooltip is positioned.</td>
</tr>
<tr parent="tooltip" class="hidden">
<td class="indent">tooltip.followMouse</td>
<td>boolean</td>
<td><code>false</code></td>
<td>If true, tooltips will follow the mouse as they move around in the item.</td>
</tr>
<tr parent="tooltip" class="hidden">
<td class="indent">tooltip.overflowMethod</td>
<td>String</td>
<td><code>'flip'</code></td>
<td>
Set how the tooltip should act if it is about to overflow out of the timeline.<br />
Choose from <code>'cap'</code> and <code>'flip'</code>. <br />
If it is set to <code>'cap'</code>, the tooltip will just cap its position to inside to timeline. <br />
While if it is set to <code>'flip'</code>, the position of the tooltip will flip around the cursor so that a corner is at the cursor, and the rest of it is visible. <br />
</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, a string or a template 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>
@ -1187,7 +1319,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>
@ -1226,7 +1358,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>
@ -1234,7 +1366,7 @@ document.getElementById('myTimeline').onclick = function (event) {
<td>setCustomTimeTitle(title [, id])</td>
<td>none</td>
<td>Adjust the title attribute of a custom time bar.
Parameter <code>title</code> is the string to be set as title. Use empty string to hide the title completely.
Parameter <code>title</code> is the string or function to be set as title. Use empty string to hide the title completely.
Parameter <code>id</code> is the id of the custom time bar, and is <code>undefined</code> by default.
</td>
</tr>
@ -1298,9 +1430,33 @@ document.getElementById('myTimeline').onclick = function (event) {
</td>
</tr>
</table>
<tr>
<td>toggleRollingMode()</td>
<td>none</td>
<td>Toggle rollingMode.
</td>
</tr>
<tr>
<td>zoomIn(percentage [, options])</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. Available options:
<ul>
<li><code>animation: boolean or {duration: number, easingFunction: string}</code><br>If true (default) or an Object, the range is animated smoothly to the new window. An object can be provided to specify duration and easing function. Default duration is 500 ms, and default easing function is <code>'easeInOutQuad'</code>. Available easing functions: <code>"linear"</code>, <code>"easeInQuad"</code>, <code>"easeOutQuad"</code>, <code>"easeInOutQuad"</code>, <code>"easeInCubic"</code>, <code>"easeOutCubic"</code>, <code>"easeInOutCubic"</code>, <code>"easeInQuart"</code>, <code>"easeOutQuart"</code>, <code>"easeInOutQuart"</code>, <code>"easeInQuint"</code>, <code>"easeOutQuint"</code>, <code>"easeInOutQuint"</code>.</li>
</ul>
</td>
</tr>
<tr>
<td>zoomOut(percentage [, options])</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. Available options:
<ul>
<li><code>animation: boolean or {duration: number, easingFunction: string}</code><br>If true (default) or an Object, the range is animated smoothly to the new window. An object can be provided to specify duration and easing function. Default duration is 500 ms, and default easing function is <code>'easeInOutQuad'</code>. Available easing functions: <code>"linear"</code>, <code>"easeInQuad"</code>, <code>"easeOutQuad"</code>, <code>"easeInOutQuad"</code>, <code>"easeInCubic"</code>, <code>"easeOutCubic"</code>, <code>"easeInOutCubic"</code>, <code>"easeInQuart"</code>, <code>"easeOutQuart"</code>, <code>"easeInOutQuart"</code>, <code>"easeInQuint"</code>, <code>"easeOutQuint"</code>, <code>"easeInOutQuint"</code>.</li>
</ul>
</td>
</tr>
</table>
<h2 id="Events">Events</h2>
<p>
@ -1314,7 +1470,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>
@ -1324,7 +1480,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
@ -1385,6 +1541,15 @@ timeline.off('select', onSelect);
</td>
</tr>
<tr>
<td>mouseOver</td>
<td>
Passes a properties object as returned by the method <a href="#getEventProperties"><code>Timeline.getEventProperties(event)</code></a>.
</td>
<td>Fired when the mouse hovers over a timeline element.
</td>
</tr>
<tr>
<td>groupDragged</td>
<td>
@ -1409,6 +1574,7 @@ timeline.off('select', onSelect);
<li><code>start</code> (Number): timestamp of the current start of the window.</li>
<li><code>end</code> (Number): timestamp of the current end of the window.</li>
<li><code>byUser</code> (Boolean): change happened because of user drag/zoom.</li>
<li><code>event</code> (Object): original event triggering the rangechange.</li>
</ul>
</td>
<td>Fired repeatedly when the timeline window is being changed.
@ -1422,6 +1588,7 @@ timeline.off('select', onSelect);
<li><code>start</code> (Number): timestamp of the current start of the window.</li>
<li><code>end</code> (Number): timestamp of the current end of the window.</li>
<li><code>byUser</code> (Boolean): change happened because of user drag/zoom.</li>
<li><code>event</code> (Object): original event triggering the rangechanged.</li>
</ul>
</td>
<td>Fired once after the timeline window has been changed.
@ -1437,17 +1604,40 @@ timeline.off('select', onSelect);
</ul>
</td>
<td>Fired after the user selects or deselects items by tapping or holding them.
When a use taps an already selected item, the select event is fired again.
When a user taps an already selected item, the select event is fired again.
Not fired when the method <code>setSelection</code>is executed.
</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>
<ul>
<li><code>id</code> (Number or String): custom time bar id.</li>
<li><code>time</code> (Date): the custom time.</li>
<li><code>event</code> (Object): original event triggering the timechange.</li>
</ul>
</td>
<td>Fired repeatedly when the user is dragging the custom time bar.
@ -1461,6 +1651,7 @@ timeline.off('select', onSelect);
<ul>
<li><code>id</code> (Number or String): custom time bar id.</li>
<li><code>time</code> (Date): the custom time.</li>
<li><code>event</code> (Object): original event triggering the timechanged.</li>
</ul>
</td>
<td>Fired once after the user has dragged the custom time bar.
@ -1496,12 +1687,13 @@ var options = {
add: true, // add new items by double tapping
updateTime: true, // drag items horizontally
updateGroup: true, // drag items from one group to another
remove: true // delete an item by tapping the delete button top right
remove: true, // delete an item by tapping the delete button top right
overrideItems: false // allow these options to override item.editable
}
};</pre>
<p>
Editing can be enabled/disabled for specific items. Setting the property <code>editable</code> to <code>true</code> or <code>false</code> on a data item will override the timeline option.
Editing can be enabled/disabled for specific items. Setting the property <code>editable</code> to <code>true</code> or <code>false</code> on a data item will override the timeline option except when <code>timeline.editable.overrideItems</code> is set to <code>true</code>.
</p>
<pre class="prettyprint lang-js">
@ -1511,6 +1703,14 @@ var items = new vis.DataSet([
]);
</pre>
<p>
Individual manipulation actions (<code>updateTime</code>, <code>updateGroup</code> and <code>remove</code>) can also be set on individual items. If any of the item-level
actions are specified (and <code>overrideItems</code> is not <code>false</code>) then that takes precedence over the settings at the timeline level. Current behavior is
that if any of the item-level actions are not specified, those items get <code>undefined</code> value (rather than inheriting from the timeline level). This may change
in future major releases, and code that specifies all item level values will handle major release changes better. That is, instead of using
<code>editable: {updateTime : true}</code>, use <code>editable: {updateTime : true, updateGroup: false, remove: false}</code>.
</p>
<p>
One can specify callback functions to validate changes made by the user. There are a number of callback functions for this purpose:
</p>
@ -1528,7 +1728,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>
@ -1554,11 +1756,11 @@ 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 the first argument, the item element as the second argument and the edited data as the third argument, and outputs formatted HTML:
</p>
<pre class="prettyprint lang-js">var options = {
template: function (item) {
template: function (item, element, data) {
var html = ... // generate HTML markup for this item
return html;
}
@ -1570,8 +1772,11 @@ var items = new vis.DataSet([
The HTML for an item can be created manually:
<pre class="prettyprint lang-js">var options = {
template: function (item) {
return '&lt;h1&gt;' + item.header + '&lt;/h1&gt;&lt;p&gt;' + item.description + '&lt;/p&gt;';
template: function (item, element, data) {
return '&lt;h1&gt;' + item.header + data.moving?' '+ data.start:'' + '&lt;/h1&gt;&lt;p&gt;' + item.description + '&lt;/p&gt;';
},
onMoving: function (item, callback) {
item.moving = true;
}
};
</pre>
@ -1601,6 +1806,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, data) {
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:
@ -1614,7 +1830,7 @@ var templates = {
};
var options = {
template: function (item) {
template: function (item, element, data) {
var template = templates[item.template]; // choose the right template
return template(item); // execute the template
}
@ -1640,7 +1856,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: {
@ -1675,6 +1891,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>
@ -1682,13 +1906,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>
@ -1762,7 +1993,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>

BIN
download/vis.zip View File


+ 0
- 12
examples/googleAnalytics.js View File

@ -1,12 +0,0 @@
(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');

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

@ -13,8 +13,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Basic Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">
@ -49,4 +49,4 @@
var graph2d = new vis.Graph2d(container, dataset, options);
</script>
</body>
</html>
</html>

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

@ -10,8 +10,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Bar Graph Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

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

@ -11,8 +11,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Groups Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">
@ -109,4 +109,4 @@
</script>
</body>
</html>
</html>

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

@ -24,8 +24,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Right Axis Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

+ 2
- 2
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">
@ -35,7 +35,7 @@
}
</style>
<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>
</head>
<body>
<h2>Graph2d | Both Axis Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

+ 2
- 2
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;
@ -11,7 +11,7 @@
<script src="../../dist/vis.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>
</head>
<body>
<h2>Graph2d | Interpolation</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

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

@ -10,8 +10,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Scrolling and Sorting</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

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

@ -18,8 +18,8 @@
<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" />
<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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Performance</h2>
<div style="width:700px; font-size:14px; text-align: justify;">
@ -147,4 +147,4 @@
var graph2d = new vis.Graph2d(container, dataset, options);
</script>
</body>
</html>
</html>

+ 4
- 4
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;
@ -190,7 +190,7 @@
<script src="../../dist/vis.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>
</head>
<body>
<h2>Graph2d | External custom legend</h2>
<div style="width:800px; font-size:14px; text-align: justify;">
@ -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>

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

@ -10,8 +10,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Bar Graphs Side by Side Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

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

@ -10,8 +10,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Bar Graphs Side by Side Example with Groups</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

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

@ -10,8 +10,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Custom axis range</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

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

@ -15,8 +15,8 @@
<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" />
<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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Localization</h2>
<p>

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

@ -16,8 +16,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Groups Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

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

@ -13,8 +13,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Streaming data</h2>
<p style="max-width: 700px;">

+ 2
- 2
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">
@ -36,7 +36,7 @@
}
</style>
<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>
</head>
<body>
<h2>Graph2d | Axis Titles and Styling</h2>
<div style="width:800px; font-size:14px; text-align: justify;">

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

@ -13,8 +13,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h2>Graph2d | Dynamic Styling Example</h2>

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

@ -10,8 +10,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Scatterplot</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

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

@ -17,8 +17,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Label Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

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

@ -11,8 +11,8 @@
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.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>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Shading Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">

+ 51
- 0
examples/graph2d/21_barsWithEnd.html View File

@ -0,0 +1,51 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Graph2d | Bar Graph Example</title>
<style type="text/css">
body, html {
font-family: sans-serif;
}
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Bar Graph With End Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">
This example shows how you can plot a bar chart and supply an end value to have it fill.
</div>
<br />
<div id="visualization"></div>
<script type="text/javascript">
var container = document.getElementById('visualization');
var items = [
{x: '2014-06-11 00:00:00', end: '2014-06-13 00:00:00', y: 10 },
{x: '2014-06-13 00:00:00', end: '2014-06-14 00:00:00', y: 15 },
{x: '2014-06-15 00:00:00', end: '2014-06-16 00:00:00', y: 14 },
{x: '2014-06-16 00:00:00', end: '2014-06-17 00:00:00', y: 17 },
{x: '2014-06-17 00:00:00', end: '2014-06-18 00:00:00', y: 20 },
{x: '2014-06-18 00:00:00', end: '2014-06-25 00:00:00', y: 25 },
];
var dataset = new vis.DataSet(items);
var options = {
style:'bar',
drawPoints: false,
dataAxis: {
icons:true
},
orientation:'top',
start: '2014-06-10',
end: '2014-06-18'
};
var graph2d = new vis.Graph2d(container, items, options);
</script>
</body>
</html>

+ 1
- 1
examples/graph3d/01_basics.html View File

@ -50,7 +50,7 @@
graph = new vis.Graph3d(container, data, options);
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="drawVisualization();">

+ 1
- 1
examples/graph3d/02_camera.html View File

@ -79,7 +79,7 @@
graph.on('cameraPositionChange', onCameraPositionChange);
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="drawVisualization()">

+ 1
- 1
examples/graph3d/03_filter_data.html View File

@ -53,7 +53,7 @@
graph = new vis.Graph3d(container, data, options);
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="drawVisualization()">

+ 1
- 1
examples/graph3d/04_animation.html View File

@ -60,7 +60,7 @@
graph = new vis.Graph3d(container, data, options);
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="drawVisualization();">

+ 1
- 1
examples/graph3d/05_line.html View File

@ -49,7 +49,7 @@
graph.setCameraPosition(0.4, undefined, undefined);
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="drawVisualization()">

+ 1
- 1
examples/graph3d/06_moving_dots.html View File

@ -67,7 +67,7 @@
graph = new vis.Graph3d(container, data, options);
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="drawVisualization();">

+ 7
- 3
examples/graph3d/07_dot_cloud_colors.html View File

@ -13,6 +13,9 @@
var data = null;
var graph = null;
function onclick(point) {
console.log(point);
}
// Called when the Visualization API is loaded.
function drawVisualization() {
@ -30,9 +33,9 @@
var x = pow(random(), 2);
var y = pow(random(), 2);
var z = pow(random(), 2);
var dist = sqrt(pow(x, 2) + pow(y, 2) + pow(z, 2));
var style = (i%2==0) ? sqrt(pow(x, 2) + pow(y, 2) + pow(z, 2)) : "#00ffff";
data.add({x:x,y:y,z:z,style:dist});
data.add({x:x,y:y,z:z,style:style});
}
// specify options
@ -45,6 +48,7 @@
keepAspectRatio: true,
verticalRatio: 1.0,
legendLabel: 'distance',
onclick: onclick,
cameraPosition: {
horizontal: -0.35,
vertical: 0.22,
@ -57,7 +61,7 @@
graph = new vis.Graph3d(container, data, options);
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="drawVisualization()">

+ 1
- 1
examples/graph3d/08_dot_cloud_size.html View File

@ -57,7 +57,7 @@
graph = new vis.Graph3d(container, data, options);
}
</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>
</head>
<body onload="drawVisualization()">
<div id="mygraph"></div>

+ 1
- 1
examples/graph3d/09_mobile.html View File

@ -70,7 +70,7 @@
graph = new vis.Graph3d(container, data, options);
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onresize="graph.redraw();" onload="drawVisualization()">

+ 1
- 1
examples/graph3d/10_styling.html View File

@ -73,7 +73,7 @@
document.getElementById('yBarWidth').onchange = drawVisualization;
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="drawVisualization()">

+ 35
- 7
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,30 @@
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;
},
// Tooltip default styling can be overridden
tooltipStyle: {
content: {
background : 'rgba(255, 255, 255, 0.7)',
padding : '10px',
borderRadius : '10px'
},
line: {
borderLeft : '1px dotted rgba(0, 0, 0, 0.5)'
},
dot: {
border : '5px solid rgba(0, 0, 0, 0.5)'
}
},
keepAspectRatio: true,
@ -73,7 +100,7 @@
document.getElementById('style').onchange = drawVisualization;
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="drawVisualization()">
@ -99,6 +126,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>

+ 1
- 1
examples/graph3d/12_custom_labels.html View File

@ -85,7 +85,7 @@
document.getElementById('style').onchange = drawVisualization;
}
</script>
<script src="../googleAnalytics.js"></script>
</head>
<body onload="drawVisualization()">

+ 1
- 1
examples/graph3d/playground/csv2datatable.html View File

@ -58,7 +58,7 @@
alert(csvArray.length + " rows converted");
}
</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>
</head>
<body>
<div id="graph"></div>

+ 1
- 1
examples/graph3d/playground/datasource.html View File

@ -6,7 +6,7 @@
<link href="prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="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>
</head>
<body onload="prettyPrint();">

+ 18
- 1
examples/graph3d/playground/index.html View File

@ -16,7 +16,7 @@
// TODO
}
</script>
<script src="../../googleAnalytics.js"></script>
</head>
<body onload="load();">
@ -112,10 +112,27 @@
<td>showGrid</td>
<td><input type="checkbox" id="showGrid" checked /></td>
</tr>
<tr>
<td>showXAxis</td>
<td><input type="checkbox" id="showXAxis" checked /></td>
</tr>
<tr>
<td>showYAxis</td>
<td><input type="checkbox" id="showYAxis" checked /></td>
</tr>
<tr>
<td>showZAxis</td>
<td><input type="checkbox" id="showZAxis" checked /></td>
</tr>
<tr>
<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>

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

@ -406,7 +406,11 @@ function getOptions() {
style: document.getElementById("style").value,
showAnimationControls: (document.getElementById("showAnimationControls").checked != false),
showGrid: (document.getElementById("showGrid").checked != false),
showXAxis: (document.getElementById("showXAxis").checked != false),
showYAxis: (document.getElementById("showYAxis").checked != false),
showZAxis: (document.getElementById("showZAxis").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,

+ 4
- 3
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 {
@ -37,7 +37,8 @@
{from: 1, to: 3},
{from: 1, to: 2},
{from: 2, to: 4},
{from: 2, to: 5}
{from: 2, to: 5},
{from: 3, to: 3}
]);
// create a network
@ -50,6 +51,6 @@
var network = new vis.Network(container, data, options);
</script>
<script src="../googleAnalytics.js"></script>
</body>
</html>

+ 2
- 2
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 {
@ -135,6 +135,6 @@
startNetwork();
</script>
<script src="../../googleAnalytics.js"></script>
</body>
</html>

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

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

+ 2
- 2
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 {
@ -82,7 +82,7 @@
}
</style>
<script src="../../../googleAnalytics.js"></script>
</head>
<body>

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

Loading…
Cancel
Save