Browse Source

Merge branch 'gh-pages' into gh-pages-dev

Conflicts:
	index.html
gh-pages
jos 9 years ago
parent
commit
4b149fc30a
211 changed files with 141053 additions and 25302 deletions
  1. +212
    -51
      blog.html
  2. +1
    -3
      css/examples.css
  3. +33
    -17
      dist/vis.css
  4. +26134
    -24828
      dist/vis.js
  5. +1
    -1
      dist/vis.map
  6. +1
    -1
      dist/vis.min.css
  7. +21
    -16
      dist/vis.min.js
  8. +85
    -0
      docs/css/newdocs.css
  9. +1
    -1
      docs/css/style.css
  10. +28
    -3
      docs/dataset.html
  11. +124
    -5
      docs/dataview.html
  12. +87
    -4
      docs/graph2d.html
  13. +1
    -1
      docs/graph3d.html
  14. +1
    -1
      docs/index.html
  15. +221
    -33
      docs/network.html
  16. +168
    -31
      docs/timeline.html
  17. BIN
      download/vis.zip
  18. +2
    -2
      examples/graph2d/01_basic.html
  19. +1
    -1
      examples/graph2d/02_bars.html
  20. +1
    -1
      examples/graph2d/03_groups.html
  21. +1
    -1
      examples/graph2d/04_rightAxis.html
  22. +1
    -1
      examples/graph2d/05_bothAxis.html
  23. +1
    -1
      examples/graph2d/06_interpolation.html
  24. +1
    -1
      examples/graph2d/07_scrollingAndSorting.html
  25. +2
    -2
      examples/graph2d/08_performance.html
  26. +1
    -1
      examples/graph2d/09_external_legend.html
  27. +1
    -1
      examples/graph2d/10_barsSideBySide.html
  28. +1
    -1
      examples/graph2d/11_barsSideBySideGroups.html
  29. +1
    -1
      examples/graph2d/12_customRange.html
  30. +2
    -2
      examples/graph2d/13_localization.html
  31. +1
    -1
      examples/graph2d/14_toggleGroups.html
  32. +1
    -1
      examples/graph2d/15_streaming_data.html
  33. +1
    -1
      examples/graph2d/16_bothAxis_titles.html
  34. +1
    -1
      examples/graph2d/17_dynamicStyling.html
  35. +1
    -1
      examples/graph2d/18_scatterplot.html
  36. +64
    -0
      examples/graph2d/19_labels.html
  37. +2
    -1
      examples/graph2d/index.html
  38. +1
    -1
      examples/graph3d/example01_basis.html
  39. +1
    -1
      examples/graph3d/example02_camera.html
  40. +1
    -1
      examples/graph3d/example03_filter.html
  41. +1
    -1
      examples/graph3d/example04_animate.html
  42. +1
    -1
      examples/graph3d/example05_line.html
  43. +1
    -1
      examples/graph3d/example06_moving_dots.html
  44. +1
    -1
      examples/graph3d/example07_dot_cloud_colors.html
  45. +1
    -1
      examples/graph3d/example08_dot_cloud_size.html
  46. +1
    -1
      examples/graph3d/example09_mobile.html
  47. +1
    -1
      examples/graph3d/example10_styles.html
  48. +1
    -1
      examples/graph3d/example11_tooltips.html
  49. +1
    -1
      examples/graph3d/example12_ticks.html
  50. +1
    -1
      examples/graph3d/index.html
  51. +1
    -1
      examples/graph3d/playground/csv2datatable.html
  52. +1
    -1
      examples/graph3d/playground/datasource.html
  53. +1
    -1
      examples/graph3d/playground/index.html
  54. +22
    -0
      examples/index.html
  55. +1
    -1
      examples/network/01_basic_usage.html
  56. +1
    -1
      examples/network/02_random_nodes.html
  57. +1
    -1
      examples/network/03_images.html
  58. +1
    -1
      examples/network/04_shapes.html
  59. +1
    -1
      examples/network/05_social_network.html
  60. +12
    -8
      examples/network/06_groups.html
  61. +1
    -1
      examples/network/07_selections.html
  62. +1
    -1
      examples/network/08_mobile_friendly.html
  63. +1
    -3
      examples/network/09_sizing.html
  64. +1
    -1
      examples/network/10_multiline_text.html
  65. +1
    -1
      examples/network/11_custom_style.html
  66. +1
    -1
      examples/network/12_scalable_images.html
  67. +1
    -1
      examples/network/13_dashed_lines.html
  68. +1
    -1
      examples/network/14_dot_language.html
  69. +3
    -2
      examples/network/15_dot_language_playground.html
  70. +1
    -1
      examples/network/16_dynamic_data.html
  71. +1
    -1
      examples/network/17_network_info.html
  72. +1
    -1
      examples/network/18_fully_random_nodes_clustering.html
  73. +1
    -1
      examples/network/19_scale_free_graph_clustering.html
  74. +1
    -1
      examples/network/20_navigation.html
  75. +1
    -1
      examples/network/21_data_manipulation.html
  76. +1
    -1
      examples/network/22_les_miserables.html
  77. +1
    -1
      examples/network/23_hierarchical_layout.html
  78. +1
    -1
      examples/network/24_hierarchical_layout_userdefined.html
  79. +1
    -1
      examples/network/25_physics_configuration.html
  80. +18
    -5
      examples/network/26_staticSmoothCurves.html
  81. +3
    -1
      examples/network/27_world_cup_network.html
  82. +1
    -1
      examples/network/28_world_cup_network_performance.html
  83. +11
    -28
      examples/network/29_neighbourhood_highlight.html
  84. +1
    -1
      examples/network/30_importing_from_gephi.html
  85. +1
    -1
      examples/network/31_localization.html
  86. +1
    -1
      examples/network/32_hierarchicaLayoutMethods.html
  87. +1
    -1
      examples/network/33_animation.html
  88. +6
    -9
      examples/network/34_circular_images.html
  89. +63
    -0
      examples/network/35_label_stroke.html
  90. +85
    -0
      examples/network/36_HTML_in_Nodes.html
  91. +51
    -0
      examples/network/37_label_alignment.html
  92. +166
    -0
      examples/network/38_node_as_icon.html
  93. +1
    -1
      examples/network/graphviz/graphviz_gallery.html
  94. +5
    -1
      examples/network/index.html
  95. +1
    -1
      examples/timeline/01_basic.html
  96. +1
    -1
      examples/timeline/02_interactive.html
  97. +2
    -2
      examples/timeline/03_performance.html
  98. +1
    -1
      examples/timeline/04_html_data.html
  99. +2
    -2
      examples/timeline/05_groups.html
  100. +1
    -1
      examples/timeline/06_event_listeners.html

+ 212
- 51
blog.html View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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">
@ -43,6 +43,7 @@
div.navbar-wrapper {
background-color:#07508E;
border-bottom: 3px solid #ffffff;
font-size:16px;
}
div.center {
@ -51,7 +52,7 @@
margin-right:auto;
}
div.container {
div.container.small{
max-width:970px;
}
@ -160,9 +161,9 @@
<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="./index.html#showcase">Showcase</a></li>
<li><a href="./showcase/index.html">Showcase</a></li>
<li><a href="./index.html#contribute">Contribute</a></li>
<li><a href="./index.html#featureRequests">Feature requests</a></li>
<li><a href="./featureRequests.html">Feature requests</a></li>
<li><a href="./index.html#licenses">License</a></li>
</ul>
</div>
@ -173,7 +174,7 @@
</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">
<div class="container full small">
<div class="center">
<img src="./images/wallHeader.png">
</div>
@ -188,6 +189,9 @@
<div class="postsMenu">
<div class="postsMenuContent">
Posts:
<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>
@ -195,6 +199,163 @@
</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>
@ -202,12 +363,12 @@
<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>.
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>
</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>
@ -215,7 +376,7 @@
</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>
</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>
@ -226,15 +387,15 @@
</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>
<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>
</p>
</div>
</div>
@ -246,22 +407,22 @@
<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,
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>
</p><p>
Have fun using vis!
</p>
</p>
</div>
</div>
@ -274,26 +435,26 @@
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.
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>
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>
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>
@ -311,7 +472,7 @@
<p>Changelog:</p>
<h3>
<a id="user-content-network" class="anchor" href="#network" aria-hidden="true"><span class="octicon octicon-link"></span></a>Network</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>
@ -337,7 +498,7 @@
</ul>
<h3>
<a id="user-content-graph2d" class="anchor" href="#graph2d" aria-hidden="true"><span class="octicon octicon-link"></span></a>Graph2d</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>
@ -348,7 +509,7 @@
</ul>
<h3>
<a id="user-content-timeline" class="anchor" href="#timeline" aria-hidden="true"><span class="octicon octicon-link"></span></a>Timeline</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>
@ -358,7 +519,7 @@
</ul>
<h3>
<a id="user-content-graph3d" class="anchor" href="#graph3d" aria-hidden="true"><span class="octicon octicon-link"></span></a>Graph3d</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>
@ -366,11 +527,11 @@
</div>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
<!-- Bootstrap core JavaScript

+ 1
- 3
css/examples.css View File

@ -6,12 +6,10 @@ body {
div.contentWrapper {
padding:10px;
}
div.container {
max-width:970px;
}
div.navbar-wrapper {
background-color:#07508E;
border-bottom: 3px solid #ffffff;
font-size:16px;
}

+ 33
- 17
dist/vis.css View File

@ -266,6 +266,7 @@
.vis.timeline .item.range .drag-left {
position: absolute;
width: 24px;
max-width: 20%;
height: 100%;
top: 0;
left: -4px;
@ -276,6 +277,7 @@
.vis.timeline .item.range .drag-right {
position: absolute;
width: 24px;
max-width: 20%;
height: 100%;
top: 0;
right: -4px;
@ -613,9 +615,8 @@ div.network-manipulationDiv {
div.network-manipulation-editMode {
position:absolute;
left: 0;
top: 0;
top: 15px;
height: 30px;
margin-top:20px;
}
div.network-manipulation-closeDiv {
@ -641,7 +642,9 @@ div.network-manipulation-closeDiv:hover {
opacity: 0.6;
}
span.network-manipulationUI {
div.network-manipulationUI {
position:relative;
top:-7px;
font-family: verdana;
font-size: 12px;
-moz-border-radius: 15px;
@ -650,7 +653,7 @@ span.network-manipulationUI {
background-position: 0px 0px;
background-repeat:no-repeat;
height:24px;
margin: -14px 0px 0px 10px;
margin: 0px 0px 0px 10px;
vertical-align:middle;
cursor: pointer;
padding: 0px 8px 0px 8px;
@ -662,57 +665,57 @@ span.network-manipulationUI {
user-select: none;
}
span.network-manipulationUI:hover {
div.network-manipulationUI:hover {
box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.20);
}
span.network-manipulationUI:active {
div.network-manipulationUI:active {
box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.50);
}
span.network-manipulationUI.back {
div.network-manipulationUI.back {
background-image: url("img/network/backIcon.png");
}
span.network-manipulationUI.none:hover {
div.network-manipulationUI.none:hover {
box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0);
cursor: default;
}
span.network-manipulationUI.none:active {
div.network-manipulationUI.none:active {
box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0);
}
span.network-manipulationUI.none {
div.network-manipulationUI.none {
padding: 0;
}
span.network-manipulationUI.notification{
div.network-manipulationUI.notification{
margin: 2px;
font-weight: bold;
}
span.network-manipulationUI.add {
div.network-manipulationUI.add {
background-image: url("img/network/addNodeIcon.png");
}
span.network-manipulationUI.edit {
div.network-manipulationUI.edit {
background-image: url("img/network/editIcon.png");
}
span.network-manipulationUI.edit.editmode {
div.network-manipulationUI.edit.editmode {
background-color: #fcfcfc;
border-style:solid;
border-width:1px;
border-color: #cccccc;
}
span.network-manipulationUI.connect {
div.network-manipulationUI.connect {
background-image: url("img/network/connectIcon.png");
}
span.network-manipulationUI.delete {
div.network-manipulationUI.delete {
background-image: url("img/network/deleteIcon.png");
}
/* top right bottom left */
span.network-manipulationLabel {
div.network-manipulationLabel {
margin: 0px 0px 0px 23px;
line-height: 25px;
}
@ -791,4 +794,17 @@ div.network-navigation.zoomExtends {
background-image: url("img/network/zoomExtends.png");
bottom:50px;
right:15px;
}
div.network-tooltip {
position: absolute;
visibility: hidden;
padding: 5px;
white-space: nowrap;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
border: 1px solid;
box-shadow: 3px 3px 10px rgba(128, 128, 128, 0.5);
}

+ 26134
- 24828
dist/vis.js
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


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


+ 85
- 0
docs/css/newdocs.css View File

@ -0,0 +1,85 @@
html {
height:100%;
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
/*font-family: Lustria, Georgia, Times, "Times New Roman", serif !important;*/
height:100%;
font-size:16px;
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.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.full {
min-height:100%;
box-shadow:0px 2px 10px rgba(0,0,0,0.4);
padding-left:20px;
padding-right:20px;
background-color:#ffffff;
}
table.moduleTable {
border:1px solid #eeeeee;
font-size:14px;
margin-left:20px;
max-width: 900px;
}
table.moduleTable td{
min-width: 80px;
padding:2px 5px 2px 5px;
height:35px;
}
table.moduleTable tr{
border:1px solid #eeeeee;
vertical-align: top;
}
tr.header {
color: #1f3350;
background-color: #cccccc;
border-bottom:1px solid #999999 !important;
font-size:16px;
font-style:italic;
}
td.mid {
background-color: #f7f7f7;
font-style:italic;
}
td.properties {
width:150px;
}
p {
max-width:1000px;
}

+ 1
- 1
docs/css/style.css View File

@ -79,5 +79,5 @@ td {
p.important_note {
color: #3a6baa;
font-weight:bold;
font-weight:bold;
}

+ 28
- 3
docs/dataset.html View File

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<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>
<title>vis.js | DataSet documentation</title>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
@ -21,6 +21,7 @@
<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>
@ -373,6 +374,29 @@ var data = new vis.DataSet([data] [, options])
</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>
@ -716,9 +740,10 @@ DataSet.map(callback [, options]);
<tr>
<td>fields</td>
<td>String[&nbsp;]</td>
<td>String[&nbsp;] | Object.&lt;String,&nbsp;String&gt;</td>
<td>
An array with field names.
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

+ 124
- 5
docs/dataview.html View File

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<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>
<title>vis.js | DataView documentation</title>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
@ -20,6 +20,8 @@
<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>
@ -127,9 +129,10 @@ var data = new vis.DataView(dataset, options)
<tr>
<td>fields</td>
<td>String[&nbsp;]</td>
<td>String[&nbsp;] | Object.&lt;String,&nbsp;String&gt;</td>
<td>
An array with field names.
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
@ -152,6 +155,122 @@ var data = new vis.DataView(dataset, options)
</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 | DataTable</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>. If parameter <code>data</code> is provided, items will be appended to this array or table, which is required in case of Google DataTable.
</td>
</tr>
<tr>
<td>
getDataSet()
</td>
<td>DataSet</td>
<td>
Get the DataSet to which the DataView is connected.
</td>
</tr>
<tr>
<td>
getIds([options])
</td>
<td>Number[]</td>
<td>
Get ids of all items or of a filtered set of items.
Available <code>options</code> are described in section <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>
@ -165,8 +284,8 @@ var items = view.get();
<p>
Data of a DataView can be filtered and formatted again, in exactly the
same way as in a DataSet. See sections
<a href="dataset.html#Data_Filtering">Data Filtering</a> and
<a href="dataset.html#Data_Formatting">Data Formatting</a> for more
<a href="dataset.html#Data_Manipulation">Data Manipulation</a> and
<a href="dataset.html#Data_Selection">Data Selection</a> for more
information.
</p>

+ 87
- 4
docs/graph2d.html View File

@ -1,6 +1,6 @@
<html>
<head>
<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>
<title>vis.js | Graph2d documentation</title>
<style>
td.greenField {
@ -175,6 +175,12 @@ var items = [
<td>no</td>
<td>The ID of the group this point belongs to.</td>
</tr>
<tr>
<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>
</tr>
</table>
<h3 id="groups">Groups</h3>
@ -672,7 +678,7 @@ The options colored in green can also be used as options for the groups. All opt
<td>orientation</td>
<td>String</td>
<td>'bottom'</td>
<td>Orientation of the timeline: 'top' or 'bottom' (default). If orientation is 'bottom', the time axis is drawn at the bottom, and if 'top', the axis is drawn on top.</td>
<td>Orientation of the timeline: 'top', 'bottom' (default), or 'both'. If orientation is 'bottom', the time axis is drawn at the bottom. When 'top', the axis is drawn on top. When 'both', two axes are drawn, both on top and at the bottom.</td>
</tr>
<tr>
@ -737,6 +743,22 @@ The options colored in green can also be used as options for the groups. All opt
If not provided, the earliest date present in the events is taken as start date.</td>
</tr>
<tr>
<td>timeAxis.scale</td>
<td>string</td>
<td>none</td>
<td>Set a fixed scale for the time axis of the Timeline. Choose from <code>'millisecond'</code>, <code>'second'</code>, <code>'minute'</code>, <code>'hour'</code>, <code>'weekday'</code>, <code>'day'</code>, <code>'month'</code>, <code>'year'</code>.</td>
</tr>
<tr>
<td>timeAxis.step</td>
<td>number</td>
<td>1</td>
<td>
Set a fixed step size for the time axis. Only applicable when used together with <code>timeAxis.scale</code>.
Choose for example 1, 2, 5, or 10.</td>
</tr>
<tr>
<td>width</td>
<td>String</td>
@ -791,6 +813,29 @@ Graph2d.clear({options: true}); // clear options only
</td>
</tr>
<tr>
<td>click</td>
<td>Fired when clicked inside the Graph2d.
</td>
<td>
Passes a properties object as returned by the method <a href="#getEventProperties"><code>Graph2d.getEventProperties(event)</code></a>.
</td>
</tr>
<tr>
<td>contextmenu</td>
<td>Fired when right-clicked inside the Graph2d. Note that in order to prevent the context menu from showing up, default behavior of the event must be stopped:
<pre class="prettyprint lang-js">graph2d.on('contextmenu', function (props) {
alert('Right click!');
props.event.preventDefault();
});
</pre>
</td>
<td>
Passes a properties object as returned by the method <a href="#getEventProperties"><code>Graph2d.getEventProperties(event)</code></a>.
</td>
</tr>
<tr>
<td>destroy()</td>
<td>none</td>
@ -798,6 +843,22 @@ Graph2d.clear({options: true}); // clear options only
</td>
</tr>
<tr>
<td>doubleClick</td>
<td>Fired when double clicked inside the Graph2d.
</td>
<td>
Passes a properties object as returned by the method <a href="#getEventProperties"><code>Graph2d.getEventProperties(event)</code></a>.
</td>
</tr>
<tr>
<td>fit()</td>
<td>none</td>
<td>Adjust the visible window such that it fits all items.
</td>
</tr>
<tr>
<td>getCurrentTime()</td>
<td>Date</td>
@ -812,6 +873,24 @@ Graph2d.clear({options: true}); // clear options only
</td>
</tr>
<tr id="getEventProperties">
<td>getEventProperties(event)</td>
<td>Object</td>
<td>
Returns an Object with relevant properties from an event:
<ul>
<li><code>pageX</code> (Number): absolute horizontal position of the click event.</li>
<li><code>pageY</code> (Number): absolute vertical position of the click event.</li>
<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>what</code> (String | 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>
</td>
</tr>
<tr>
<td>getLegend(groupId, iconWidth, iconHeight)</td>
<td>SVGelement, String, String</td>
@ -832,9 +911,13 @@ Graph2d.clear({options: true}); // clear options only
</tr>
<tr>
<td>fit()</td>
<td>hiddenDates</td>
<td>Object</td>
<td>none</td>
<td>Adjust the visible window such that it fits all items.
<td>This option allows you to hide specific timespans from the time axis. The dates can be supplied as an object:
<code>{start: '2014-03-21 00:00:00', end: '2014-03-28 00:00:00', [repeat:'daily']}</code> or as an Array of these objects. The repeat argument is optional.
The possible values are (case-sensitive): <code>daily, weekly, monthly, yearly</code>. To hide a weekend, pick any Saturday as start and the following Monday as end
and set repeat to weekly.
</td>
</tr>

+ 1
- 1
docs/graph3d.html View File

@ -1,6 +1,6 @@
<html>
<head>
<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>
<title>vis.js | graph3d documentation</title>
<link href='css/prettify.css' type='text/css' rel='stylesheet'>

+ 1
- 1
docs/index.html View File

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<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>
<title>vis.js | documentation</title>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />

+ 221
- 33
docs/network.html View File

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<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>
<title>vis.js | network documentation</title>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
@ -165,14 +165,14 @@ The constructor accepts three parameters:
<code>edges</code>, which both contain an array with objects.
Optionally, data may contain an <code>options</code> object.
The parameter <code>data</code> is optional, data can also be set using
the method <code>setData</code>. Section <a href="#Data_Format">Data Format</a>
the method <code>setData</code>. Section <a href="#Data_format">Data Format</a>
describes the data object.
</li>
<li>
<code>options</code> is an optional Object containing a name-value map
with options. Options can also be set using the method
<code>setOptions</code>.
Section <a href="#Configuration_Options">Configuration Options</a>
Section <a href="#Configuration_options">Configuration Options</a>
describes the available options.
</li>
</ul>
@ -214,7 +214,7 @@ var data = {
<span style="font-weight: bold;">A property <code>options</code></span>,
containing an object with global options.
Options can be provided as third parameter in the network constructor
as well. Section <a href="#Configuration_Options">Configuration Options</a>
as well. Section <a href="#Configuration_options">Configuration Options</a>
describes the available options.
</li>
@ -280,13 +280,13 @@ When using a DataSet, the network is automatically updating to changes in the Da
<td>allowedToMoveX</td>
<td>Boolean</td>
<td>no</td>
<td>If allowedToMoveX is false, then the node will not move in the X direction from its position.</td>
<td>If allowedToMoveX is false, then the node will not move in the X direction from its position. This does not do anything in hierarchical views.</td>
</tr>
<tr>
<td>allowedToMoveY</td>
<td>Boolean</td>
<td>no</td>
<td>If allowedToMoveY is false, then the node will not move in the Y direction from its position.</td>
<td>If allowedToMoveY is false, then the node will not move in the Y direction from its position. This does not do anything in hierarchical views.</td>
</tr>
<tr>
@ -303,7 +303,8 @@ When using a DataSet, the network is automatically updating to changes in the Da
<td>level</td>
<td>number</td>
<td>no</td>
<td>This level is used in the hierarchical layout. If this is not selected, the level does not do anything.</td>
<td>This level is used in the hierarchical layout. If this is not selected, the level does not do anything. This must be a postive number (min value: 0).
Fractions are possible but only integers are supported.</td>
</tr>
<tr>
@ -342,7 +343,7 @@ When using a DataSet, the network is automatically updating to changes in the Da
<td>no</td>
<td>Horizontal position in pixels.
The horizontal position of the node will be fixed unless combined with the allowedToMoveX:true option.
The vertical position y may remain undefined.</td>
The vertical position y may remain undefined. This does not work with hierarchical layout.</td>
</tr>
<tr>
<td>y</td>
@ -350,7 +351,7 @@ When using a DataSet, the network is automatically updating to changes in the Da
<td>no</td>
<td>Vertical position in pixels.
The vertical position of the node will be fixed unless combined with the allowedToMoveY:true option.
The horizontal position x may remain undefined.</td>
The horizontal position x may remain undefined. This does not work with hierarchical layout.</td>
</tr>
</table>
@ -598,7 +599,14 @@ var options = {
<td>When a Network is configured to be <code>clickToUse</code>, it will react to mouse, touch, and keyboard events only when active.
When active, a blue shadow border is displayed around the Network. The Network is set active by clicking on it, and is changed to inactive again by clicking outside the Network or by pressing the ESC key.</td>
</tr>
<tr>
<td>useDefaultGroups</td>
<td>boolean</td>
<td>true</td>
<td>If true, the default groups are used when groups are used. If you have defined your own groups those will be used. If you have an item with a group that is NOT in your own group list,
setting useDefaultGroups true will iterate over the default groups for unknown groups. If it is set to false, it will iterate over your own groups for unknown groups.
</td>
</tr>
<tr>
<td><a href="#Physics">physics</a></td>
<td>Object</td>
@ -646,7 +654,7 @@ var options = {
</tr>
<tr>
<td>freezeForStabilization</a></td>
<td>freezeForStabilization</td>
<td>Boolean</td>
<td>false</td>
<td>
@ -757,7 +765,7 @@ var options = {
<td>smoothCurves.type</td>
<td>String</td>
<td>"continuous"</td>
<td>This option only affects NONdynamic smooth curves. The supported types are: <code>continuous, discrete, diagonalCross, straightCross, horizontal, vertical</code>. The effects of these types
<td>This option only affects NONdynamic smooth curves. The supported types are: <code>continuous, discrete, diagonalCross, straightCross, horizontal, vertical, curvedCW, curvedCCW</code>. The effects of these types
are shown in examples <a href="../examples/network/26_staticSmoothCurves.html">26</a> and <a href="../examples/network/27_world_cup_network.html">27</a></td>
</tr>
<tr>
@ -848,6 +856,13 @@ var options = {
inside an object <code>nodes</code> in the networks options object.</p> All options in green boxes can be defined per-node as well.
All options defined per-node override these global settings.
<table>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr>
<td class="greenField">borderWidth</td>
<td>Number</td>
@ -860,6 +875,31 @@ All options defined per-node override these global settings.
<td>undefined</td>
<td>The width of the border of the node when it is selected. If left at undefined, double the borderWidth will be used.</td>
</tr>
<tr>
<td>customScalingFunction</td>
<td>Function</td>
<td>Function</td>
<td>This is a function you can override to make the nodes scale the way you want them based on their values. The default function is this: <br>
<pre class="prettyprint lang-js">
function (min,max,total,value) {
if (max == min) {
return 0.5;
}
else {
var scale = 1 / (max - min);
return Math.max(0,(value - min)*scale);
}
};
</pre>
The function receives the minimum value of the set, the maximum value, the total sum of all values and finally the value of the node or edge it works on. It has to return a value between 0 and 1.
The nodes and edges then calculate their size as follows:
<pre class="prettyprint lang-js">
var scale = customScalingFunction(min,max,total,value);
var diff = maxSize - minSize;
mySize = minSize + diff * scale;</pre>
</td>
</tr>
<tr>
<td class="greenField">color</td>
<td>String | Object</td>
@ -926,13 +966,56 @@ All options defined per-node override these global settings.
<td>14</td>
<td>Font size in pixels for label in the node.</td>
</tr>
<tr>
<td>scaleFontWithValue</td>
<td>Boolean</td>
<td>false</td>
<td>When using values, you can let the font scale with the size of the nodes if you enable the this option.</td>
</tr>
<tr>
<td>fontSizeMin</td>
<td>Number</td>
<td>14</td>
<td>When using values, you can let the font scale with the size of the nodes if you enable the scaleFontWithValue option. This is the minimum value of the fontSize.</td>
</tr>
<tr>
<td>fontSizeMax</td>
<td>Number</td>
<td>30</td>
<td>When using values, you can let the font scale with the size of the nodes if you enable the scaleFontWithValue option. This is the maximum value of the fontSize.</td>
</tr>
<tr>
<td>fontSizeMaxVisible</td>
<td>Number</td>
<td>30</td>
<td>When using values, you can let the font scale with the size of the nodes if you enable the scaleFontWithValue option. If you have a wide distribution of values and have a large max fontSize,
the text will become huge if you zoom in on it. This option limits the percieved fontSize to avoid this. If you set it to 20, no label will be larger than fontsize 20 (at scale = 1) regardless of the scale.</td>
</tr>
<tr>
<td>fontDrawThreshold</td>
<td>Number</td>
<td>3</td>
<td>When zooming out, the text becomes smaller. This option sets the minimum size of the label before not being drawn. Just like the fontSizeMaxVisible option, this is the relative fontSize (fontSize * scale).
You can combine this with the min and max values to have the labels of influential nodes show earlier when zooming in.</td>
</tr>
<tr>
<td class="greenField">fontFill</td>
<td>String</td>
<td>undefined</td>
<td>If a color is supplied, there will be a background color behind the label. If left undefined, no background color is shown.</td>
</tr>
<tr>
<td class="greenField">fontStrokeWidth</td>
<td>Number</td>
<td>0</td>
<td>The width of the label stroke (border around label's text) in pixels.</td>
</tr>
<tr>
<td class="greenField">fontStrokeColor</td>
<td>String</td>
<td>'white'</td>
<td>The color of the label stroke.</td>
</tr>
<tr>
<td class="greenField">shape</td>
<td>string</td>
@ -941,7 +1024,7 @@ All options defined per-node override these global settings.
Choose from
<code>ellipse</code> (default), <code>circle</code>, <code>box</code>,
<code>database</code>, <code>image</code>, <code>circularImage</code>, <code>label</code>, <code>dot</code>,
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>.
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, <code>square</code> and <code>icon</code>.
<br><br>
In case of <code>image</code> and <code>circularImage</code>, a property with name <code>image</code> must
@ -988,13 +1071,13 @@ All options defined per-node override these global settings.
<td>widthMin</td>
<td>Number</td>
<td>16</td>
<td>The minimum width for a scaled image. Only applicable to shape <code>image</code>.</td>
<td>The minimum width for a scaled image. Only applicable to shape <code>image</code>. This only does something if you supply a value.</td>
</tr>
<tr>
<td>widthMax</td>
<td>Number</td>
<td>64</td>
<td>The maximum width for a scaled image. Only applicable to shape <code>image</code>.</td>
<td>The maximum width for a scaled image. Only applicable to shape <code>image</code>. This only does something if you supply a value.</td>
</tr>
<tr>
@ -1009,15 +1092,39 @@ All options defined per-node override these global settings.
<td>Number</td>
<td>10</td>
<td>The minimum radius for a scaled node. Only applicable to shapes <code>dot</code>,
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>.</td>
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>. This only does something if you supply a value.</td>
</tr>
<tr>
<td>radiusMax</td>
<td>Number</td>
<td>30</td>
<td>The maximum radius for a scaled node. Only applicable to shapes <code>dot</code>,
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>.</td>
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>. This only does something if you supply a value.</td>
</tr>
<tr>
<td class="greenField">iconFontFace</td>
<td>String</td>
<td>undefined</td>
<td>Font face for icons, for example <code>FontAwesome</code> or <code>Ionicon</code>.<br /><em>You have to link to the css defining the font by yourself (see Examples)</em></td>
</tr>
<tr>
<td class="greenField">icon</td>
<td>String</td>
<td>undefined</td>
<td>Unicode of the icon f.e. <code>\uf0c0</code> (user-icon in FontAwesome)</td>
</tr>
<tr>
<td class="greenField">iconSize</td>
<td>Number</td>
<td>50</td>
<td>Size of the icon</td>
</tr>
<tr>
<td class="greenField">color</td>
<td>String</td>
<td>black</td>
<td>Color of the icon</td>
</tr>
</table>
@ -1156,15 +1263,19 @@ var options = {
<td>Font fill for the background color of the text label of the edge.
Only applicable when property <code>label</code> is defined.</td>
</tr>
<tr>
<td class="greenField">style</td>
<td>string</td>
<td>line</td>
<td>Define a line style for the edge.
Choose from <code>line</code> (default), <code>arrow</code>,
<code>arrow-center</code>, or <code>dash-line</code>.
</td>
<td class="greenField">fontStrokeWidth</td>
<td>Number</td>
<td>0</td>
<td>The width of the label stroke (border around label's text) in pixels.
Only applicable when property <code>label</code> is defined.</td>
</tr>
<tr>
<td class="greenField">fontStrokeColor</td>
<td>String</td>
<td>'white'</td>
<td>The color of the label stroke.
Only applicable when property <code>label</code> is defined.</td>
</tr>
<tr>
<td class="greenField">inheritColor</td>
@ -1173,6 +1284,28 @@ var options = {
<td>Possible values: <code>"to","from", true, false</code>. If this value is set to false, the edge color information is used. If the value is set to true or "from",
the color data from the borders of the "from" node is used. If this value is "to", the color data from the borders of the "to" node is used.</td>
</tr>
<tr>
<td class="greenField">labelAlignment</td>
<td>String</td>
<td>horizontal</td>
<td>Possible values: <code>"line-above", "line-center", "line-below"</code>. The alignment of the label when drawn on the edge.
If <code>horizontal</code> it will align the label absolute horizontial.</td>
</tr>
<tr>
<td class="greenField">opacity</td>
<td>Number</td>
<td>1.0</td>
<td>Possible values: <code>[0 .. 1]</code>. This opacity value is added on top of the color information. This only happens for the unselected state.</td>
</tr>
<tr>
<td class="greenField">style</td>
<td>string</td>
<td>line</td>
<td>Define a line style for the edge.
Choose from <code>line</code> (default), <code>arrow</code>,
<code>arrow-center</code>, or <code>dash-line</code>.
</td>
</tr>
<tr>
<td class="greenField">width</td>
<td>number</td>
@ -1191,13 +1324,13 @@ var options = {
<td>widthMin</td>
<td>Number</td>
<td>1</td>
<td>The minimum thickness of the line when using per-edge defined values.</td>
<td>The minimum thickness of the line when using per-edge defined values. This does nothing if you have not defined a value.</td>
</tr>
<tr>
<td>widthMax</td>
<td>Number</td>
<td>15</td>
<td>The maximum thickness of the line when using per-edge defined values.</td>
<td>The maximum thickness of the line when using per-edge defined values. This does nothing if you have not defined a value.</td>
</tr>
</table>
@ -1316,6 +1449,18 @@ var nodes = [
<td>14</td>
<td>Font size for the node in pixels.</td>
</tr>
<tr>
<td>fontStrokeWidth</td>
<td>Number</td>
<td>0</td>
<td>The width of the label stroke (border around label's text) in pixels.</td>
</tr>
<tr>
<td>fontStrokeColor</td>
<td>String</td>
<td>"white"</td>
<td>The color of the label stroke.</td>
</tr>
<tr>
<td>shape</td>
<td>String</td>
@ -1345,7 +1490,7 @@ To unify the physics system, the damping, repulsion distance and edge length hav
If no options for the physics system are supplied, the Barnes-Hut method will be used with the default parameters. If you want to customize the physics system easily, you can use the configurePhysics option. <br/>
When using the hierarchical display option, hierarchicalRepulsion is automatically used as the physics solver. Similarly, if you use the hierarchicalRepulsion physics option, hierarchical display is automatically turned on with default settings.
<p class="important_note">Note: if the behaviour of your network is not the way you want it, use configurePhysics as described <u><a href="#PhysicsConfiguration">below</a></u> or by <u><a href="../examples/network/25_physics_configuration.html">example 25</a></u>.</p>
<p class="important_note">Note: if the behaviour of your network is not the way you want it, use configurePhysics as described <u><a href="#PhysicsConfiguration">below</a></u> or by <u><a href="../examples/network/25_physics_configuration.html">example 25</a></u>.
</p>
<pre class="prettyprint">
// These variables must be defined in an options object named physics.
@ -1681,7 +1826,8 @@ var options = {
radius: 1},
maxNodeSizeIncrements: 600,
activeAreaBoxSize: 100,
clusterLevelDifference: 2
clusterLevelDifference: 2,
clusterByZoom: true
}
}
// OR to just load the module with default values:
@ -1824,6 +1970,12 @@ var options = {
If the highest level of your network at any given time is 3, nodes that have not clustered or
have clustered only once will join their neighbour with the lowest cluster level.</td>
</tr>
<tr>
<td>clusterByZoom</td>
<td>Boolean</td>
<td>true</td>
<td>You can toggle the clustering by zoom level using this option.</td>
</tr>
</table>
<h3 id="Navigation_controls">Navigation controls</h3>
@ -1860,7 +2012,8 @@ var options = {
x: 10,
y: 10,
zoom: 0.02
}
},
bindToWindow: true
}
}
</pre>
@ -1892,6 +2045,12 @@ var options = {
<td>0.02</td>
<td>This defines the zoomspeed when using the keyboard navigation.</td>
</tr>
<tr>
<td>bindToWindow</td>
<td>Boolean</td>
<td>true</td>
<td>If this is true, global keyboard events will be used. If it is false, the keyboard events are only used when the network is active. It is activated on mouseOver automatically.</td>
</tr>
</table>
@ -2156,11 +2315,18 @@ var options = {
</td>
</tr>
<tr>
<td>getBoundingBox()</td>
<td>getBoundingBox(nodeId)</td>
<td>Object</td>
<td>Returns a bounding box for the node including label in the format: {top:Number,left:Number,right:Number,bottom:Number}. These values are in canvas space.
</td>
</tr>
<tr>
<td>getConnectedNodes(nodeId)</td>
<td>Array</td>
<td>Returns an array with nodeIds of nodes that are connected to this node. Network keeps track of the connected nodes so this function allows you
to quickly get them without iterating over all edges manually. This is a lot faster for cases with many edges.
</td>
</tr>
<tr>
<td>getSelection()</td>
<td>Array of ids</td>
@ -2187,6 +2353,13 @@ var options = {
easeInQuint, easeOutQuint, easeInOutQuint </code> <br /><br />
</td>
</tr>
<tr>
<td>freezeSimulation(Boolean)</td>
<td>none</td>
<td>Calling freezeSimulation(true) immmediately stops the simulation and triggerst the stabilized event. This does not mean that the network
is physically stabilized but the nodes are not moving anymore. To continue the simulation call freezeSimulation(false).
</td>
</tr>
<tr>
<td>releaseNode()</td>
<td>none</td>
@ -2276,6 +2449,12 @@ var options = {
nodes with id 3 and 5. The highlisghEdges boolean can be used to automatically select the edges connected to the node.
</td>
</tr>
<tr>
<td>getConnectedNodes(nodeId)</td>
<td>Array</td>
<td>Get an array of (unique) nodeIds that are directly connected to this node.
</td>
</tr>
<tr>
<td>selectEdges(selection)</td>
<td>none</td>
@ -2295,7 +2474,7 @@ var options = {
or in percentages.</td>
</tr>
<tr>
<td>getPositions([ids])</td>
<td>getPositions([nodeIds])</td>
<td>Object</td>
<td>This will return an object of all nodes' positions. Data can be accessed with object[nodeId].x and .y. You can optionally supply an id as string or number or an array of ids. If no id or array of ids have been supplied, all positions are returned.
</td>
@ -2317,6 +2496,7 @@ var options = {
options can just be a boolean. When true, the zoom is animated, when false there is no animation.
Alternatively, you can supply an object.
<br /><br /> The object can consist of:<br />
<b><code>nodes: [nodeIds]</code></b><br /> - an optional subset of nodes to zoom in on,<br />
<b><code>duration: Number</code></b><br /> - the duration of the animation in milliseconds,<br />
<b><code>easingFunction: String</code></b><br /> - the easing function of the animation, available are:<br />
<code>linear, easeInQuad, easeOutQuad, easeInOutQuad, easeInCubic, easeOutCubic, easeInOutCubic,
@ -2325,6 +2505,7 @@ var options = {
</td>
</tr>
</table>
<h2 id="Events">Events</h2>
@ -2474,6 +2655,13 @@ network.off('select', onSelect);
none
</td>
</tr>
<tr>
<td>stabilizationIterationsDone</td>
<td>Fired once when the network finished the initial stabilization run. This is fired REGARDLESS if the network has stabilized. It only means that the amount of configured stabilizationIterations have been completed.
<td>
none
</td>
</tr>
<tr>
<td>stabilized</td>
<td>Fired every time the network has been stabilized. This event can be used to trigger the .storePositions() function after stabilization. Fired with an object having the following properties:</td>

+ 168
- 31
docs/timeline.html View File

@ -1,6 +1,6 @@
<html>
<head>
<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>
<title>vis.js | timeline documentation</title>
<link href='css/prettify.css' type='text/css' rel='stylesheet'>
@ -205,7 +205,7 @@ var items = [
</tr>
<tr>
<td>end</td>
<td>Date</td>
<td>Date | number | string | Moment</td>
<td>no</td>
<td>The end date of the item. The end date is optional, and can be left <code>null</code>.
If end date is provided, the item is displayed as a range.
@ -232,7 +232,7 @@ var items = [
</tr>
<tr>
<td>start</td>
<td>Date</td>
<td>Date | number | string | Moment</td>
<td>yes</td>
<td>The start date of the item, for example <code>new Date(2010,9,23)</code>.</td>
</tr>
@ -468,7 +468,7 @@ var options = {
<tr>
<td>end</td>
<td>Date | Number | String</td>
<td>Date | Number | String | Moment</td>
<td>none</td>
<td>The initial end date for the axis of the timeline.
If not provided, the latest date present in the items set is taken as
@ -554,6 +554,13 @@ var options = {
<td>A map with i18n locales. See section <a href="#Localization">Localization</a> for more information.</td>
</tr>
<tr>
<td>margin</td>
<td>Number | Object</td>
<td>Object</td>
<td>When a number, applies the margin to <code>margin.axis</code>, <code>margin.item.horizontal</code>, and <code>margin.item.vertical</code>.</td>
</tr>
<tr>
<td>margin.axis</td>
<td>Number</td>
@ -584,7 +591,7 @@ var options = {
<tr>
<td>max</td>
<td>Date | Number | String</td>
<td>Date | Number | String | Moment</td>
<td>none</td>
<td>Set a maximum Date for the visible range.
It will not be possible to move beyond this maximum.
@ -600,7 +607,7 @@ var options = {
<tr>
<td>min</td>
<td>Date | Number | String</td>
<td>Date | Number | String | Moment</td>
<td>none</td>
<td>Set a minimum Date for the visible range.
It will not be possible to move beyond this minimum.
@ -664,24 +671,39 @@ var options = {
</td>
</tr>
<!-- TODO: cleanup option order
<tr>
<td>order</td>
<td>Function</td>
<td>none</td>
<td>Provide a custom sort function to order the items. The order of the
<td>
<p>Provide a custom sort function to order the items. The order of the
items is determining the way they are stacked. The function
order is called with two parameters, both of type
`vis.components.items.Item`.
order is called with two arguments containing the data of two items to be
compared.
</p>
<p style="font-style: italic">WARNING: Use with caution. Custom ordering is not suitable for large amounts of items. On load, the Timeline will render all items once to determine their width and height. Keep the number of items in this configuration limited to a maximum of a few hundred items.</p>
</td>
</tr>
-->
<tr>
<td>orientation</td>
<td>String | Object</td>
<td>'bottom'</td>
<td>Orientation of the timelines axis and items. When orientation is a string, the value is applied to both items and axis. Can be 'top', 'bottom' (default), or 'both'.</td>
</tr>
<tr>
<td>orientation.axis</td>
<td>String</td>
<td>'bottom'</td>
<td>Orientation of the timeline: 'top' or 'bottom' (default). If orientation is 'bottom', the time axis is drawn at the bottom, and if 'top', the axis is drawn on top.</td>
<td>Orientation of the timeline axis: 'top', 'bottom' (default), or 'both'. If orientation is 'bottom', the time axis is drawn at the bottom. When 'top', the axis is drawn on top. When 'both', two axes are drawn, both on top and at the bottom.</td>
</tr>
<tr>
<td>orientation.item</td>
<td>String</td>
<td>'bottom'</td>
<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>
@ -742,6 +764,7 @@ var options = {
<code>showMinorLabels</code> are false, no horizontal axis will be
visible.</td>
</tr>
<tr>
<td>stack</td>
<td>Boolean</td>
@ -749,9 +772,19 @@ var options = {
<td>If true (default), items will be stacked on top of each other such that they do not overlap.</td>
</tr>
<tr>
<td>snap</td>
<td>function | null</td>
<td>function</td>
<td>When moving items on the Timeline, they will be snapped to nice dates like full hours or days, depending on the current scale. The <code>snap</code> function can be replaced with a custom function, or can be set to <code>null</code> to disable snapping. The signature of the snap function is:
<pre class="prettyprint lang-js">function snap(date: Date, scale: string, step: number) : Date | number</pre>
The parameter <code>scale</code> can be can be 'millisecond', 'second', 'minute', 'hour', 'weekday, 'day, 'month, or 'year'. The parameter <code>step</code> is a number like 1, 2, 4, 5.
</td>
</tr>
<tr>
<td>start</td>
<td>Date | Number | String</td>
<td>Date | Number | String | Moment</td>
<td>none</td>
<td>The initial start date for the axis of the timeline.
If not provided, the earliest date present in the events is taken as start date.</td>
@ -764,6 +797,26 @@ var options = {
<td>A template function used to generate the contents of the items. The function is called by the Timeline with an items data as argument, and must return HTML code as result. When the option template is specified, the items do not need to have a field <code>content</code>. See section <a href="#Templates">Templates</a> for a detailed explanation.</td>
</tr>
<tr>
<td>timeAxis.scale</td>
<td>string</td>
<td>none</td>
<td>Set a fixed scale for the time axis of the Timeline. Choose from <code>'millisecond'</code>, <code>'second'</code>, <code>'minute'</code>, <code>'hour'</code>, <code>'weekday'</code>, <code>'day'</code>, <code>'month'</code>, <code>'year'</code>. Example usage:
<pre class="prettyprint lang-js">var options = {
timeAxis: {scale: 'minute', step: 5}
}</pre>
</td>
</tr>
<tr>
<td>timeAxis.step</td>
<td>number</td>
<td>1</td>
<td>
Set a fixed step size for the time axis. Only applicable when used together with <code>timeAxis.scale</code>.
Choose for example 1, 2, 5, or 10.</td>
</tr>
<tr>
<td>type</td>
<td>String</td>
@ -823,6 +876,15 @@ var options = {
<th>Description</th>
</tr>
<tr>
<td>addCustomTime(time[, id])</td>
<td>Number | String</td>
<td>
Only applicable when the option showCustomTime is true.<br>
Add new vertical bar representing custom time that can be dragged by the user. Parameter <code>time</code> can be a Date, Number, or String. Parameter <code>id</code> can be Number or String. If <code>id</code> is provided, it will be used as ID for the new vertical bar, otherwise the ID will be auto generated.<br>
Returns ID of the newly created bar.
</td>
</tr>
<tr>
<td>clear([what])</td>
<td>none</td>
@ -872,9 +934,29 @@ timeline.clear({options: true}); // clear options only
</tr>
<tr>
<td>getCustomTime()</td>
<td>getCustomTime([id])</td>
<td>Date</td>
<td>Retrieve the custom time. Only applicable when the option <code>showCustomTime</code> is true.
<td>Retrieve the custom time. Only applicable when the option <code>showCustomTime</code> is true. If parameter <code>id</code> is provided, time of the custom time bar under that ID is returned.
</td>
</tr>
<tr id="getEventProperties">
<td>getEventProperties(event)</td>
<td>Object</td>
<td>
Returns an Object with relevant properties from an event:
<ul>
<li><code>group</code> (Number | null): the id of the clicked group.</li>
<li><code>item</code> (Number | null): the id of the clicked item.</li>
<li><code>pageX</code> (Number): absolute horizontal position of the click event.</li>
<li><code>pageY</code> (Number): absolute vertical position of the click event.</li>
<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>snappedTime</code> (Date): Date of the clicked event, snapped to a nice value.</li>
<li><code>what</code> (String | null): name of the clicked thing: <code>item</code>, <code>background</code>, <code>axis</code>, <code>group-label</code>, <code>custom-time</code>, or <code>current-time</code>.</li>
<li><code>event</code> (Object): the original click event.</li>
</ul>
</td>
</tr>
@ -921,7 +1003,17 @@ timeline.clear({options: true}); // clear options only
<tr>
<td>redraw()</td>
<td>none</td>
<td>Force a redraw of the Timeline. Can be useful to manually redraw when option autoResize=false.
<td>Force a redraw of the Timeline. The size of all items will be recalculated.
Can be useful to manually redraw when option <code>autoResize=false</code> and the window
has been resized, or when the items CSS has been changed.
</td>
</tr>
<tr>
<td>removeCustomTime(id)</td>
<td>none</td>
<td>
Remove vertical bars previously added to the timeline via <code>addCustomTime</code> method. Parameter <code>id</code> is the ID of the custom vertical bar returned by <code>addCustomTime</code> method.
</td>
</tr>
@ -934,9 +1026,9 @@ timeline.clear({options: true}); // clear options only
</tr>
<tr>
<td>setCustomTime(time)</td>
<td>setCustomTime(time [, id])</td>
<td>none</td>
<td>Adjust the custom time bar. Only applicable when the option <code>showCustomTime</code> is true. <code>time</code> can be a Date object, numeric timestamp, or ISO date string.
<td>Adjust the custom time bar. Only applicable when the option <code>showCustomTime</code> is true. Parameter <code>time</code> can be a Date object, numeric timestamp, or ISO date string. Parameter <code>id</code> represents ID of the custom time bar, provided by <code>addCustomTime</code> method and can be a Number or String.
</td>
</tr>
@ -1042,35 +1134,70 @@ timeline.off('select', onSelect);
<th>Description</th>
<th>Properties</th>
</tr>
<tr>
<td>finishedRedraw</td>
<td>Fired after a redraw is complete. When moving the timeline around, this could be fired frequently.
</td>
<td>
none.
</td>
</tr>
<tr>
<tr>
<td>click</td>
<td>Fired when clicked inside the Timeline.
</td>
<td>
Passes a properties object as returned by the method <a href="#getEventProperties"><code>Timeline.getEventProperties(event)</code></a>.
</td>
</tr>
<tr>
<td>contextmenu</td>
<td>Fired when right-clicked inside the Timeline. Note that in order to prevent the context menu from showing up, default behavior of the event must be stopped:
<pre class="prettyprint lang-js">timeline.on('contextmenu', function (props) {
alert('Right click!');
props.event.preventDefault();
});
</pre>
</td>
<td>
Passes a properties object as returned by the method <a href="#getEventProperties"><code>Timeline.getEventProperties(event)</code></a>.
</td>
</tr>
<tr>
<td>doubleClick</td>
<td>Fired when double clicked inside the Timeline.
</td>
<td>
Passes a properties object as returned by the method <a href="#getEventProperties"><code>Timeline.getEventProperties(event)</code></a>.
</td>
</tr>
<tr>
<td>finishedRedraw</td>
<td>Fired after a redraw is complete. When moving the timeline around, this could be fired frequently.
</td>
<td>
none.
</td>
</tr>
<tr>
<td>rangechange</td>
<td>Fired repeatedly when the user is dragging the timeline window.
<td>Fired repeatedly when the timeline window is being changed.
</td>
<td>
<ul>
<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>
</ul>
</td>
</tr>
<tr>
<td>rangechanged</td>
<td>Fired once after the user has dragged the timeline window.
<td>Fired once after the timeline window has been changed.
</td>
<td>
<ul>
<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>
</ul>
</td>
</tr>
@ -1095,6 +1222,7 @@ timeline.off('select', onSelect);
</td>
<td>
<ul>
<li><code>id</code> (Number | String): Vertical bar ID.</li>
<li><code>time</code> (Date): the current time.</li>
</ul>
</td>
@ -1107,6 +1235,7 @@ timeline.off('select', onSelect);
</td>
<td>
<ul>
<li><code>id</code> (Number | String): Vertical bar ID.</li>
<li><code>time</code> (Date): the current time.</li>
</ul>
</td>
@ -1116,8 +1245,16 @@ timeline.off('select', onSelect);
<h2 id="Editing_Items">Editing Items</h2>
<p>
When the Timeline is configured to be editable (both options <code>selectable</code> and <code>editable</code> are <code>true</code>), the user can move items by dragging them, can create a new item by double tapping on an empty space, can update an item by double tapping it, and can delete a selected item by clicking the delete button on the top right.
When the Timeline is configured to be editable (both options <code>selectable</code> and <code>editable</code> are <code>true</code>), the user can:
</p>
<ul>
<li>Select an item by clicking it, and use ctrl+click to or shift+click to select multiple items</li>
<li>Move selected items by dragging them.</li>
<li>Create a new item by double tapping on an empty space.</li>
<li>Create a new range item by dragging on an empty space with the ctrl key down.</li>
<li>Update an item by double tapping it.</li>
<li>Delete a selected item by clicking the delete button on the top right.</li>
</ul>
<p>Option <code>editable</code> accepts a boolean or an object. When <code>editable</code> is a boolean, all manipulation actions will be either enabled or disabled. When <code>editable</code> is an object, one can enable individual manipulation actions:</p>

BIN
download/vis.zip View File


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

@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<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 content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Graph2d | Basic Example</title>
@ -44,7 +44,7 @@
var dataset = new vis.DataSet(items);
var options = {
start: '2014-06-10',
end: '2014-06-18',
end: '2014-06-18'
};
var graph2d = new vis.Graph2d(container, dataset, options);
</script>

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Bar Graph Example</title>
<style type="text/css">

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Groups Example</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Right Axis Example</title>
<style type="text/css">

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Both Axis Example</title>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<style type="text/css">

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Interpolation</title>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<style type="text/css">

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Scrolling and Sorting</title>
<style type="text/css">

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Performance</title>
<style>
@ -15,7 +15,7 @@
</style>
<!-- note: moment.js must be loaded before vis.js, else vis.js uses its embedded version of moment.js -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.3.1/moment.min.js"></script>
<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" />

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | External legend Example</title>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<style type="text/css">

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Bar Graphs Side by Side Example</title>
<style type="text/css">

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Bar Graphs Side by Side Example with Groups</title>
<style type="text/css">

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Bar Graph Example</title>
<style type="text/css">

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

@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<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 content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Graph2d | Localization</title>
@ -13,7 +13,7 @@
}
</style>
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment-with-langs.min.js"></script>
<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" />
</head>

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Toggle Groups Example</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">

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

@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<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 content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Graph2d | Streaming data</title>

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Axis Titles and Styling</title>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<style type="text/css">

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

@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<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 content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Graph2d | Dynamic Styling</title>

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Graph2d | Scatterplot</title>
<style type="text/css">

+ 64
- 0
examples/graph2d/19_labels.html View File

@ -0,0 +1,64 @@
<!DOCTYPE HTML>
<html>
<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 content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Graph2d | Basic Example</title>
<style type="text/css">
body, html {
font-family: sans-serif;
}
.red {
fill:red;
}
</style>
<script src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2>Graph2d | Label Example</h2>
<div style="width:700px; font-size:14px; text-align: justify;">
This example shows the how to add a label to each point in Graph2d. Each item can have a label object which contains the content and CSS class.In addition, xOffset and yOffset will adjust the location of the label relative to the point being labelled.
<br /><br />
</div>
<br />
<div id="visualization"></div>
<script type="text/javascript">
var container = document.getElementById('visualization');
var label1 = {
content: "offset label",
xOffset: 20,
yOffset: 20
}
var label2 = {
content: "Label2",
className: "red"
}
var items = [
{x: '2014-06-11', y: 10,label:label1},
{x: '2014-06-12', y: 25,label:label2},
{x: '2014-06-13', y: 30},
{x: '2014-06-14', y: 10},
{x: '2014-06-15', y: 15},
{x: '2014-06-16', y: 30}
];
var dataset = new vis.DataSet(items);
var options = {
start: '2014-06-10',
end: '2014-06-18',
};
var graph2d = new vis.Graph2d(container, dataset, options);
</script>
</body>
</html>

+ 2
- 1
examples/graph2d/index.html View File

@ -1,5 +1,5 @@
<html>
<head>
<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>
<link rel='stylesheet' href='default.css' type='text/css'>
</head>
<body>
@ -25,6 +25,7 @@
<p><a href="16_bothAxis_titles.html">16_bothAxis_titles.html</a></p>
<p><a href="17_dynamicStyling.html">17_dynamicStyling.html</a></p>
<p><a href="18_scatterplot.html">18_scatterplot.html</a></p>
<p><a href="19_labels.html">19_labels.html</a></p>
</div>
</body>

+ 1
- 1
examples/graph3d/example01_basis.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D demo</title>
<style>

+ 1
- 1
examples/graph3d/example02_camera.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D camera position</title>
<style>

+ 1
- 1
examples/graph3d/example03_filter.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D demo</title>
<style>

+ 1
- 1
examples/graph3d/example04_animate.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D animation demo</title>
<style type="text/css">

+ 1
- 1
examples/graph3d/example05_line.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D line demo</title>
<style>

+ 1
- 1
examples/graph3d/example06_moving_dots.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D animation moving dots</title>
<style>

+ 1
- 1
examples/graph3d/example07_dot_cloud_colors.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D cloud with colored dots</title>
<style>

+ 1
- 1
examples/graph3d/example08_dot_cloud_size.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D cloud with sized dots</title>
<style>

+ 1
- 1
examples/graph3d/example09_mobile.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D demo</title>
<style>

+ 1
- 1
examples/graph3d/example10_styles.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D styles</title>
<style>

+ 1
- 1
examples/graph3d/example11_tooltips.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D tooltips</title>
<style>

+ 1
- 1
examples/graph3d/example12_ticks.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D Axis Ticks</title>
<style>

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

@ -1,5 +1,5 @@
<html>
<head>
<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>
<link rel='stylesheet' href='default.css' type='text/css'>
</head>
<body>

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Convert CSV to Google Datatable</title>
<style>

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

@ -1,6 +1,6 @@
<html>
<head>
<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>
<title>Graph3d documentation</title>
<link rel='stylesheet' href='default.css' type='text/css'>

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

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Graph 3D - Playground</title>
<script type="text/javascript" src="../../../dist/vis.js"></script>

+ 22
- 0
examples/index.html View File

@ -0,0 +1,22 @@
<!doctype html>
<html>
<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>
<title>vis.js | examples</title>
<link href='../docs/css/style.css' type='text/css' rel='stylesheet'>
</head>
<body>
<div id="container">
<h1>vis.js examples</h1>
<p><a href="network">network</a></p>
<p><a href="graph2d">graph2d</a></p>
<p><a href="graph3d">graph3d</a></p>
<p><a href="timeline">timeline</a></p>
</div>
</body>
</html>

+ 1
- 1
examples/network/01_basic_usage.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Basic usage</title>
<script type="text/javascript" src="../../dist/vis.js"></script>

+ 1
- 1
examples/network/02_random_nodes.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Random nodes</title>
<style type="text/css">

+ 1
- 1
examples/network/03_images.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Images</title>
<style type="text/css">

+ 1
- 1
examples/network/04_shapes.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Shapes</title>
<style type="text/css">

+ 1
- 1
examples/network/05_social_network.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Social Network</title>
<style>

+ 12
- 8
examples/network/06_groups.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Groups</title>
<style>
@ -8,9 +8,10 @@
font: 10pt arial;
}
#mynetwork {
width: 600px;
height: 600px;
width: 1900px;
height: 900px;
border: 1px solid lightgray;
background-color:#222222;
}
</style>
@ -139,11 +140,14 @@
edges: edges
};
var options = {
stabilize: false,
stabilize: true,
nodes: {
shape: 'dot'
shape: 'dot',
radius:30,
fontColor:'#ffffff',
borderWidth:2
},
physics: {barnesHut:{springLength: 200}}
physics: {barnesHut:{springLength: 100}}
};
network = new vis.Network(container, data, options);
}
@ -154,9 +158,9 @@
<body onload="draw()">
<form onsubmit= "javascript: draw(); return false;">
Number of groups:
<input type="text" value="6" id="groupCount" style="width: 50px;">
<input type="text" value="20" id="groupCount" style="width: 50px;">
Number of nodes per group:
<input type="text" value="7" id="nodeCount" style="width: 50px;">
<input type="text" value="1" id="nodeCount" style="width: 50px;">
<input type="submit" value="Go">
</form>
<br>

+ 1
- 1
examples/network/07_selections.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Selections</title>
<script type="text/javascript" src="../../dist/vis.js"></script>

+ 1
- 1
examples/network/08_mobile_friendly.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Network | Mobile friendly</title>
<style type="text/css">

+ 1
- 3
examples/network/09_sizing.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Network | Sizing</title>
<style type="text/css">
@ -22,8 +22,6 @@
var edges = null;
var network = null;
var DIR = 'img/soft-scraps-icons/';
function draw() {
// create people.
// value corresponds with the age of the person

+ 1
- 1
examples/network/10_multiline_text.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Network | Multiline text</title>
<style type="text/css">

+ 1
- 1
examples/network/11_custom_style.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Network | Custom style</title>
<style type="text/css">

+ 1
- 1
examples/network/12_scalable_images.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Scalable images</title>
<style type="text/css">

+ 1
- 1
examples/network/13_dashed_lines.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Dashed lines</title>
<style type="text/css">

+ 1
- 1
examples/network/14_dot_language.html View File

@ -1,5 +1,5 @@
<html>
<head>
<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>
<title>Network | DOT Language</title>
<script type="text/javascript" src="../../dist/vis.js"></script>

+ 3
- 2
examples/network/15_dot_language_playground.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | DOT language playground</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
@ -80,7 +80,8 @@
</table>
<script type="text/javascript">
var network, data;
var network = null;
var data = null;
var btnDraw = document.getElementById('draw');
var txtData = document.getElementById('data');

+ 1
- 1
examples/network/16_dynamic_data.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | DataSet</title>
<style type="text/css">

+ 1
- 1
examples/network/17_network_info.html View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<!-- saved from url=(0046)http://visjs.org/examples/network/03_images.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<html><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=ISO-8859-1">
<title>Network | Images</title>
<style type="text/css">

+ 1
- 1
examples/network/18_fully_random_nodes_clustering.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Fully random nodes clustering</title>
<style type="text/css">

+ 1
- 1
examples/network/19_scale_free_graph_clustering.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Scale free network clustering</title>
<style type="text/css">

+ 1
- 1
examples/network/20_navigation.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Navigation</title>
<style type="text/css">

+ 1
- 1
examples/network/21_data_manipulation.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Data Manipulation</title>
<style type="text/css">

+ 1
- 1
examples/network/22_les_miserables.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<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>
<title>Network | Multiline text</title>
<style type="text/css">

+ 1
- 1
examples/network/23_hierarchical_layout.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Random nodes</title>
<style type="text/css">

+ 1
- 1
examples/network/24_hierarchical_layout_userdefined.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Hierarchical Layout, userDefined</title>
<style type="text/css">

+ 1
- 1
examples/network/25_physics_configuration.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Playing with Physics</title>
<style type="text/css">

+ 18
- 5
examples/network/26_staticSmoothCurves.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Static smooth curves</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
@ -32,19 +32,26 @@
Smooth curve type:
<select id="dropdownID">
<option value="continuous">continuous</option>
<option value="continuous" selected="selected">continuous</option>
<option value="discrete">discrete</option>
<option value="diagonalCross">diagonalCross</option>
<option value="straightCross">straightCross</option>
<option value="horizontal">horizontal</option>
<option value="vertical">vertical</option>
</select>
<option value="curvedCW">curvedCW</option>
<option value="curvedCCW">curvedCCW</option>
</select><br/>
Roundness (0..1): <input type="range" min="0" max="1" value="0.5" step="0.05" style="width:200px" id="roundnessSlider"> <input id="roundnessScreen" value="0.5"> (0.5 is max roundness for continuous, 1.0 for the others)
<div id="mynetwork"></div>
<script type="text/javascript">
var dropdown = document.getElementById("dropdownID");
dropdown.onchange = update;
var roundnessSlider = document.getElementById("roundnessSlider");
roundnessSlider.onchange = update;
var roundnessScreen = document.getElementById("roundnessScreen");
// create an array with nodes
var nodes = [
{id: 1, label: 'Node 1'},
@ -53,7 +60,7 @@ dropdown.onchange = update;
// create an array with edges
var edges = [
{from: 1, to: 2}
{from: 1, to: 2, style:"arrow"}
];
// create a network
@ -68,8 +75,14 @@ dropdown.onchange = update;
function update() {
var type = dropdown.value;
network.setOptions({smoothCurves:{type:type}});
var roundness = roundnessSlider.value;
roundnessScreen.value = roundness;
var options = {smoothCurves:{type:type, roundness:roundness}}
network.setOptions(options);
}
update();
</script>
</body>

+ 3
- 1
examples/network/27_world_cup_network.html View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<!-- saved from url=(0044)http://kenedict.com/networks/worldcup14/vis/ , thanks Andre!-->
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF8">
<html><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=UTF8">
<title>Network | Static smooth curves - World Cup Network</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
@ -39,6 +39,8 @@ Smooth curve type:
<option value="straightCross">straightCross</option>
<option value="horizontal">horizontal</option>
<option value="vertical">vertical</option>
<option value="curvedCW">curvedCW</option>
<option value="curvedCCW">curvedCCW</option>
</select><br/>
inheritColor option:
<select id="inheritColor">

+ 1
- 1
examples/network/28_world_cup_network_performance.html View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<!-- saved from url=(0044)http://kenedict.com/networks/worldcup14/vis/ , thanks Andre!-->
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF8">
<html><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=UTF8">
<title>Network | Static smooth curves - World Cup Network</title>
<script type="text/javascript" src="../../dist/vis.js"></script>

+ 11
- 28
examples/network/29_neighbourhood_highlight.html View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<!-- saved from url=(0044)http://kenedict.com/networks/worldcup14/vis/ , thanks Andre!-->
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF8">
<html><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=UTF8">
<title>Network | Static smooth curves - World Cup Network</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
@ -10027,7 +10027,12 @@ function redrawAll() {
radiusMin: 10,
radiusMax: 30,
fontSize: 12,
fontFace: "Tahoma"
fontFace: "Tahoma",
scaleFontWithValue:true,
fontSizeMin:8,
fontSizeMax:20,
fontThreshold:12,
fontSizeMaxVisible:20
},
edges: {
width: 0.15,
@ -10071,8 +10076,6 @@ function onClick(selectedItems) {
}
}
else {
var allEdges = edges.get();
// we clear the level of separation in all nodes.
clearLevelOfSeperation(allNodes);
@ -10083,7 +10086,7 @@ function onClick(selectedItems) {
// any data can be added to a node, this is just stored in the nodeObject.
storeLevelOfSeperation(connectedNodes,0, allNodes);
for (var i = 1; i < degrees + 1; i++) {
appendConnectedNodes(connectedNodes, allEdges);
appendConnectedNodes(connectedNodes);
storeLevelOfSeperation(connectedNodes, i, allNodes);
}
for (nodeId in allNodes) {
@ -10153,7 +10156,7 @@ function clearLevelOfSeperation(allNodes) {
*
*
*/
function appendConnectedNodes(sourceNodes, allEdges) {
function appendConnectedNodes(sourceNodes) {
var tempSourceNodes = [];
// first we make a copy of the nodes so we do not extend the array we loop over.
for (var i = 0; i < sourceNodes.length; i++) {
@ -10165,7 +10168,8 @@ function appendConnectedNodes(sourceNodes, allEdges) {
if (sourceNodes.indexOf(nodeId) == -1) {
sourceNodes.push(nodeId);
}
addUnique(getConnectedNodes(nodeId, allEdges),sourceNodes);
var connectedNodes = network.getConnectedNodes(nodeId);
addUnique(connectedNodes,sourceNodes);
}
tempSourceNodes = null;
}
@ -10183,27 +10187,6 @@ function addUnique(fromArray, toArray) {
}
}
/**
* Get a list of nodes that are connected to the supplied nodeId with edges.
* @param nodeId
* @returns {Array}
*/
function getConnectedNodes(nodeId, allEdges) {
var edgesArray = allEdges;
var connectedNodes = [];
for (var i = 0; i < edgesArray.length; i++) {
var edge = edgesArray[i];
if (edge.to == nodeId) {
connectedNodes.push(edge.from);
}
else if (edge.from == nodeId) {
connectedNodes.push(edge.to)
}
}
return connectedNodes;
}
redrawAll()
</script>

+ 1
- 1
examples/network/30_importing_from_gephi.html View File

@ -1,6 +1,6 @@
<!DOCTYPE html>
<!-- saved from url=(0044)http://kenedict.com/networks/worldcup14/vis/ , thanks Andre!-->
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF8">
<html><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=UTF8">
<title>Dynamic Data - Importing from Gephi (JSON)</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
<link type="text/css" rel="stylesheet" href="../../dist/vis.css">

+ 1
- 1
examples/network/31_localization.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Localization</title>
<style type="text/css">

+ 1
- 1
examples/network/32_hierarchicaLayoutMethods.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Hierarchical layout difference</title>
<style type="text/css">

+ 1
- 1
examples/network/33_animation.html View File

@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
<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>
<title>Network | Animation</title>
<style type="text/css">

+ 6
- 9
examples/network/34_circular_images.html View File

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<title>Network | Scalable images</title>
<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>
<title>Network | Circular images</title>
<style type="text/css">
body {
@ -44,7 +44,8 @@
{id: 11, shape: 'circularImage', image: DIR + '11.png'},
{id: 12, shape: 'circularImage', image: DIR + '12.png'},
{id: 13, shape: 'circularImage', image: DIR + '13.png'},
{id: 14, shape: 'circularImage', image: DIR + '14.png'}
{id: 14, shape: 'circularImage', image: DIR + '14.png'},
{id: 15, label:"when images\nfail\nto load", shape: 'circularImage', image: DIR + 'missing.png', brokenImage: DIR + 'missingBrokenImage.png'}
];
// create connetions between people
@ -64,6 +65,7 @@
{from: 11, to: 12},
{from: 12, to: 13},
{from: 13, to: 14},
{from: 14, to: 15}
];
// create a network
@ -74,15 +76,10 @@
};
var options = {
nodes: {
shape: 'circle',
borderWidth:4,
color: {
border: '#222222',
background: '#ffffff',
highlight: {
border: '#428eff',
background: '#ffffff'
}
background: '#666666'
},
fontColor:'#eeeeee'
},

+ 63
- 0
examples/network/35_label_stroke.html View File

@ -0,0 +1,63 @@
<!doctype html>
<html>
<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>
<title>Network | Label stroke</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {
width: 400px;
height: 400px;
border: 1px solid lightgray;
background: #d1d1d1;
}
</style>
</head>
<body>
<div id="mynetwork"></div>
<script type="text/javascript">
// create an array with nodes
var nodes = [
{id: 1, label: 'Node 1', fontStrokeWidth : 5, fontStrokeColor: 'white'},
{id: 2, label: 'Node 2'},
{id: 3, label: 'Node 3'},
{id: 4, label: 'Node 4'},
{id: 5, label: 'Node 5'}
];
// create an array with edges
var edges = [
{from: 1, to: 2, label: 'edgeLabel', fontStrokeWidth : 2, fontStrokeColor : '#00ff00'},
{from: 1, to: 3, label: 'edgeLabel'},
{from: 2, to: 4},
{from: 2, to: 5}
];
// create a network
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
edges: edges
};
var options = {
nodes : {
shape : 'dot',
fontStrokeWidth : 1,
fontStrokeColor : '#d1d1d1'
},
edges : {
fontStrokeWidth : 1,
fontStrokeColor : '#d1d1d1',
fontFill : 'none'
}
};
var network = new vis.Network(container, data, options);
</script>
</body>
</html>

+ 85
- 0
examples/network/36_HTML_in_Nodes.html View File

@ -0,0 +1,85 @@
<!doctype html>
<html>
<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>
<title>Network | HTML in nodex</title>
<style type="text/css">
body {
font: 10pt arial;
}
#mynetwork {
width: 600px;
height: 600px;
border: 1px solid lightgray;
background-color:#eeeeee;
}
</style>
<script type="text/javascript" src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var nodes = null;
var edges = null;
var network = null;
var DIR = 'img/refresh-cl/';
var LENGTH_MAIN = 150;
var LENGTH_SUB = 50;
var data = '<svg xmlns="http://www.w3.org/2000/svg" width="243" height="65">' +
'<rect x="0" y="0" width="100%" height="100%" fill="#7890A7" stroke-width="20" stroke="#ffffff" ></rect>' +
'<foreignObject x="15" y="10" width="100%" height="100%">' +
'<div xmlns="http://www.w3.org/1999/xhtml" style="font-size:40px">' +
'<em>I</em> like' +
'<span style="color:white; text-shadow:0 0 20px #000000;">' +
'cheese</span>' +
'</div>' +
'</foreignObject>' +
'</svg>';
var DOMURL = window.URL || window.webkitURL || window;
var img = new Image();
var svg = new Blob([data], {type: 'image/svg+xml;charset=utf-8'});
var url = DOMURL.createObjectURL(svg);
// Called when the Visualization API is loaded.
function draw() {
// Create a data table with nodes.
nodes = [];
// Create a data table with links.
edges = [];
nodes.push({id: 1, label: 'Get HTML', image: url, shape: 'image'});
nodes.push({id: 2, label: 'Using SVG', image: url, shape: 'image'});
edges.push({from: 1, to: 2, length: 300});
// create a network
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
edges: edges
};
var options = {
stabilize: false,
smoothCurves:false
};
network = new vis.Network(container, data, options);
}
</script>
</head>
<body onload="draw()">
<p>
This example demonstrates showing custom HTML in Nodes, by using an SVG image.
</p>
<p style="color: red;">
WARNING: this is currently not supported by all browsers.
</p>
<div id="mynetwork"></div>
</body>
</html>

+ 51
- 0
examples/network/37_label_alignment.html View File

@ -0,0 +1,51 @@
<!doctype html>
<html>
<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>
<title>Network | Basic usage</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {
width: 400px;
height: 400px;
border: 1px solid lightgray;
}
</style>
</head>
<body>
<div id="mynetwork"></div>
<script type="text/javascript">
// create an array with nodes
var nodes = [
{id: 1, label: 'Node 1'},
{id: 2, label: 'Node 2'},
{id: 3, label: 'Node 3'},
{id: 4, label: 'Node 4'},
{id: 5, label: 'Node 5'}
];
// create an array with edges
var edges = [
{from: 1, to: 2, label: '1 to 2', labelAlignment:'line-center', fontFill:'orange' },
{from: 1, to: 3, label: '1 to 3', labelAlignment:'line-above', fontFill:'green'},
{from: 2, to: 4, label: '2 to 4', fontFill:'red'},
{from: 2, to: 5, label: '2 to 5', labelAlignment:'line-below', fontFill:'#ccd' }
];
// create a network
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
edges: edges
};
var options = {};
var network = new vis.Network(container, data, options);
</script>
</body>
</html>

+ 166
- 0
examples/network/38_node_as_icon.html View File

@ -0,0 +1,166 @@
<!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 charset="UTF-8">
<title>Network | node as icon</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<script language="JavaScript">
function draw() {
/*
* Example for FontAwesome
*/
var optionsFA = {
height: '300px',
groups: {
usergroups: {
shape: 'icon',
iconFontFace: 'FontAwesome',
icon: '\uf0c0',
iconSize: 50,
iconColor: '#57169a'
},
users: {
shape: 'icon',
iconFontFace: 'FontAwesome',
icon: '\uf007',
iconSize: 50,
iconColor: '#aa00ff'
}
}
};
// create an array with nodes
var nodesFA = [{
id: 1,
label: 'User 1',
group: 'users'
}, {
id: 2,
label: 'User 2',
group: 'users'
}, {
id: 3,
label: 'Usergroup 1',
group: 'usergroups'
}, {
id: 4,
label: 'Usergroup 2',
group: 'usergroups'
}, {
id: 5,
label: 'Organisation 1',
shape: 'icon',
iconFontFace: 'FontAwesome',
icon: '\uf1ad',
iconSize: 50,
iconColor: '#f0a30a'
}];
// create an array with edges
var edges = [{
from: 1,
to: 3
}, {
from: 1,
to: 4
}, {
from: 2,
to: 4
}, {
from: 3,
to: 5
}, {
from: 4,
to: 5
}];
// create a network
var containerFA = document.getElementById('mynetworkFA');
var dataFA = {
nodes: nodesFA,
edges: edges
};
var networkFA = new vis.Network(containerFA, dataFA, optionsFA);
/*
* Example for Ionicons
*/
var optionsIO = {
height: '300px',
groups: {
usergroups: {
shape: 'icon',
iconFontFace: 'Ionicons',
icon: '\uf47c',
iconSize: 50,
iconColor: '#57169a'
},
users: {
shape: 'icon',
iconFontFace: 'Ionicons',
icon: '\uf47e',
iconSize: 50,
iconColor: '#aa00ff'
}
}
};
// create an array with nodes
var nodesIO = [{
id: 1,
label: 'User 1',
group: 'users'
}, {
id: 2,
label: 'User 2',
group: 'users'
}, {
id: 3,
label: 'Usergroup 1',
group: 'usergroups'
}, {
id: 4,
label: 'Usergroup 2',
group: 'usergroups'
}, {
id: 5,
label: 'Organisation 1',
shape: 'icon',
iconFontFace: 'Ionicons',
icon: '\uf276',
iconSize: 50,
iconColor: '#f0a30a'
}];
// create a network
var containerIO = document.getElementById('mynetworkIO');
var dataIO = {
nodes: nodesIO,
edges: edges
};
var networkIO = new vis.Network(containerIO, dataIO, optionsIO);
}
</script>
</head>
<body onload="draw()">
<h2>
<i class="fa fa-flag"></i> Use FontAwesome-icons for node</h2>
<div id="mynetworkFA"></div>
<h2>
<i class="ion ion-ionic"></i> Use Ionicons-icons for node</h2>
<div id="mynetworkIO"></div>
</body>
</html>

+ 1
- 1
examples/network/graphviz/graphviz_gallery.html View File

@ -1,5 +1,5 @@
<html>
<head>
<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>
<title>Network | Graphviz Gallery</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>

+ 5
- 1
examples/network/index.html View File

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<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>
<title>vis.js | Network examples</title>
<link href='../../docs/css/style.css' type='text/css' rel='stylesheet'>
@ -46,6 +46,10 @@
<p><a href="32_hierarchicaLayoutMethods.html">32_hierarchicaLayoutMethods.html</a></p>
<p><a href="33_animation.html">33_animation.html</a></p>
<p><a href="34_circular_images.html">34_circular_images.html</a></p>
<p><a href="35_label_stroke.html">35_label_stroke.html</a></p>
<p><a href="36_HTML_in_Nodes.html">36_HTML_in_Nodes.html</a></p>
<p><a href="37_label_alignment.html">37_label_alignment.html</a></p>
<p><a href="38_node_as_icon.html">38_node_as_icon.html</a></p>
<p><a href="graphviz/graphviz_gallery.html">graphviz_gallery.html</a></p>
</div>

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

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Timeline | Basic demo</title>
<style type="text/css">

+ 1
- 1
examples/timeline/02_interactive.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Timeline | Interactive example</title>
<style>

+ 2
- 2
examples/timeline/03_performance.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Timeline | a lot of data</title>
<style>
@ -11,7 +11,7 @@
</style>
<!-- note: moment.js must be loaded before vis.js, else vis.js uses its embedded version of moment.js -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.3.1/moment.min.js"></script>
<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" />

+ 1
- 1
examples/timeline/04_html_data.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Timeline | HTML data</title>
<style>

+ 2
- 2
examples/timeline/05_groups.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Timeline | Group example</title>
<style>
@ -17,7 +17,7 @@
</style>
<!-- note: moment.js must be loaded before vis.js, else vis.js uses its embedded version of moment.js -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.3.1/moment.min.js"></script>
<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" />

+ 1
- 1
examples/timeline/06_event_listeners.html View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML>
<html>
<head>
<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>
<title>Timeline | Event listeners</title>
<style type="text/css">

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

Loading…
Cancel
Save