From b28028ac4082842143b0f528d6bc539da6ccb419 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Thu, 21 Sep 2017 12:49:18 -0400 Subject: mega changes, including updates and X --- .../examples/timeline/other/customTimeBars.html | 89 +++++++++++++ .../examples/timeline/other/dataAttributes.html | 44 +++++++ .../examples/timeline/other/dataAttributesAll.html | 44 +++++++ www/lib/vis/examples/timeline/other/drag&drop.html | 131 +++++++++++++++++++ .../timeline/other/functionLabelFormats.html | 141 +++++++++++++++++++++ .../examples/timeline/other/groupsPerformance.html | 110 ++++++++++++++++ .../vis/examples/timeline/other/hidingPeriods.html | 53 ++++++++ .../examples/timeline/other/horizontalScroll.html | 77 +++++++++++ .../vis/examples/timeline/other/localization.html | 68 ++++++++++ .../vis/examples/timeline/other/performance.html | 65 ++++++++++ .../other/requirejs/requirejs_example.html | 17 +++ .../timeline/other/requirejs/scripts/main.js | 19 +++ .../timeline/other/requirejs/scripts/require.js | 35 +++++ www/lib/vis/examples/timeline/other/rtl.html | 50 ++++++++ www/lib/vis/examples/timeline/other/timezone.html | 80 ++++++++++++ .../vis/examples/timeline/other/usingReact.html | 123 ++++++++++++++++++ .../examples/timeline/other/verticalScroll.html | 93 ++++++++++++++ 17 files changed, 1239 insertions(+) create mode 100644 www/lib/vis/examples/timeline/other/customTimeBars.html create mode 100644 www/lib/vis/examples/timeline/other/dataAttributes.html create mode 100644 www/lib/vis/examples/timeline/other/dataAttributesAll.html create mode 100644 www/lib/vis/examples/timeline/other/drag&drop.html create mode 100644 www/lib/vis/examples/timeline/other/functionLabelFormats.html create mode 100644 www/lib/vis/examples/timeline/other/groupsPerformance.html create mode 100644 www/lib/vis/examples/timeline/other/hidingPeriods.html create mode 100644 www/lib/vis/examples/timeline/other/horizontalScroll.html create mode 100644 www/lib/vis/examples/timeline/other/localization.html create mode 100644 www/lib/vis/examples/timeline/other/performance.html create mode 100644 www/lib/vis/examples/timeline/other/requirejs/requirejs_example.html create mode 100644 www/lib/vis/examples/timeline/other/requirejs/scripts/main.js create mode 100644 www/lib/vis/examples/timeline/other/requirejs/scripts/require.js create mode 100644 www/lib/vis/examples/timeline/other/rtl.html create mode 100644 www/lib/vis/examples/timeline/other/timezone.html create mode 100644 www/lib/vis/examples/timeline/other/usingReact.html create mode 100644 www/lib/vis/examples/timeline/other/verticalScroll.html (limited to 'www/lib/vis/examples/timeline/other') diff --git a/www/lib/vis/examples/timeline/other/customTimeBars.html b/www/lib/vis/examples/timeline/other/customTimeBars.html new file mode 100644 index 00000000..2c1a5f7c --- /dev/null +++ b/www/lib/vis/examples/timeline/other/customTimeBars.html @@ -0,0 +1,89 @@ + + + + Timeline | Show current and custom time bars + + + + + + + + + +

+ The Timeline has functions to add multiple custom time bars which can be dragged by the user. +

+

+ + +

+

+ + +

+

+ timechange event, index: , time: +

+

+ timechanged event, index: , time: +


+ +
+ + + + \ No newline at end of file diff --git a/www/lib/vis/examples/timeline/other/dataAttributes.html b/www/lib/vis/examples/timeline/other/dataAttributes.html new file mode 100644 index 00000000..0aa1f14e --- /dev/null +++ b/www/lib/vis/examples/timeline/other/dataAttributes.html @@ -0,0 +1,44 @@ + + + + Timeline | Basic demo + + + + + + + + +

+ In this example all items get an HTML attribute attached: each item gets an attribute data-id, and items 1 and 6 have an additional attribute data-tooltip. +

+ +
+ + + + \ No newline at end of file diff --git a/www/lib/vis/examples/timeline/other/dataAttributesAll.html b/www/lib/vis/examples/timeline/other/dataAttributesAll.html new file mode 100644 index 00000000..5b926b54 --- /dev/null +++ b/www/lib/vis/examples/timeline/other/dataAttributesAll.html @@ -0,0 +1,44 @@ + + + + Timeline | Basic demo + + + + + + + + +

+ In this example all items get HTML attributes attached: each item gets data-? attributes for each field defined on the JS object. +

+ +
+ + + + \ No newline at end of file diff --git a/www/lib/vis/examples/timeline/other/drag&drop.html b/www/lib/vis/examples/timeline/other/drag&drop.html new file mode 100644 index 00000000..81bcb1f1 --- /dev/null +++ b/www/lib/vis/examples/timeline/other/drag&drop.html @@ -0,0 +1,131 @@ + + + + + Timeline | Drag & Drop + + + + + + + + + + + +

Timeline Drag & Drop Example

+ +

For this to work, you will have to define your own 'dragstart' eventListener on each item in your list of items (make sure that any new item added to the list is attached to this eventListener 'dragstart' handler). This 'dragstart' handler must set dataTransfer - notice you can set the item's information as you want this way.

+ +
+
+

Items:

+ +
+ + + + + diff --git a/www/lib/vis/examples/timeline/other/functionLabelFormats.html b/www/lib/vis/examples/timeline/other/functionLabelFormats.html new file mode 100644 index 00000000..9de9023b --- /dev/null +++ b/www/lib/vis/examples/timeline/other/functionLabelFormats.html @@ -0,0 +1,141 @@ + + + + Timeline | Custom function label format example + + + + + + + + + + + +

+ This example demonstrate using custom function label formats. +

+
+ + + + \ No newline at end of file diff --git a/www/lib/vis/examples/timeline/other/groupsPerformance.html b/www/lib/vis/examples/timeline/other/groupsPerformance.html new file mode 100644 index 00000000..1b16af30 --- /dev/null +++ b/www/lib/vis/examples/timeline/other/groupsPerformance.html @@ -0,0 +1,110 @@ + + + Timeline | A lot of grouped data + + + + + + + + + +

Timeline grouping performance

+ +

+ Choose a number of items: + 100, + 1000, + 10000, + 100000 +

+

+ Current number of items: 100 +

+ +
+ + + + + diff --git a/www/lib/vis/examples/timeline/other/hidingPeriods.html b/www/lib/vis/examples/timeline/other/hidingPeriods.html new file mode 100644 index 00000000..52ec6f9a --- /dev/null +++ b/www/lib/vis/examples/timeline/other/hidingPeriods.html @@ -0,0 +1,53 @@ + + + + Timeline | Hiding periods + + + + + + + + +

+ It's possible to hide (recurring) periods from the Timeline. The following example hides weekends and nights. +

+
+ + + \ No newline at end of file diff --git a/www/lib/vis/examples/timeline/other/horizontalScroll.html b/www/lib/vis/examples/timeline/other/horizontalScroll.html new file mode 100644 index 00000000..a999cd51 --- /dev/null +++ b/www/lib/vis/examples/timeline/other/horizontalScroll.html @@ -0,0 +1,77 @@ + + + Timeline | Horizontal Scroll Option + + + + + + + + + +

Timeline horizontal scroll option

+ +
+ + + + + diff --git a/www/lib/vis/examples/timeline/other/localization.html b/www/lib/vis/examples/timeline/other/localization.html new file mode 100644 index 00000000..5b58923b --- /dev/null +++ b/www/lib/vis/examples/timeline/other/localization.html @@ -0,0 +1,68 @@ + + + + Timeline | Localization + + + + + + + + + +

+ To localize the Timeline, one has to load a version of moment.js including locales. To set a locale, specify option {locale: STRING}. +

+ +

+ + +

+ +
+ + + + diff --git a/www/lib/vis/examples/timeline/other/performance.html b/www/lib/vis/examples/timeline/other/performance.html new file mode 100644 index 00000000..45b22aab --- /dev/null +++ b/www/lib/vis/examples/timeline/other/performance.html @@ -0,0 +1,65 @@ + + + + Timeline | performance + + + + + + + + + + + +

+ Test the performance with a lot of items. The Timeline can load hundreds of thousands of items, but the performance of rendering them in the browser is limited. Rendering typically runs smooth for up to a few hundreds of items at once (you can set a zoomMax to prevent the user from zooming out too far). +

+

+ + + +

+
+ + + + \ No newline at end of file diff --git a/www/lib/vis/examples/timeline/other/requirejs/requirejs_example.html b/www/lib/vis/examples/timeline/other/requirejs/requirejs_example.html new file mode 100644 index 00000000..363845fe --- /dev/null +++ b/www/lib/vis/examples/timeline/other/requirejs/requirejs_example.html @@ -0,0 +1,17 @@ + + + + Timeline require.js demo + + + + + + + +

+ This example shows how to load the vis.js library using require.js. +

+
+ + diff --git a/www/lib/vis/examples/timeline/other/requirejs/scripts/main.js b/www/lib/vis/examples/timeline/other/requirejs/scripts/main.js new file mode 100644 index 00000000..f8148540 --- /dev/null +++ b/www/lib/vis/examples/timeline/other/requirejs/scripts/main.js @@ -0,0 +1,19 @@ +require.config({ + paths: { + vis: '../../../../../dist/vis' + } +}); + +require(['vis'], function (vis) { + var container = document.getElementById('visualization'); + var data = new vis.DataSet([ + {id: 1, content: 'item 1', start: '2013-04-20'}, + {id: 2, content: 'item 2', start: '2013-04-14'}, + {id: 3, content: 'item 3', start: '2013-04-18'}, + {id: 4, content: 'item 4', start: '2013-04-16', end: '2013-04-19'}, + {id: 5, content: 'item 5', start: '2013-04-25'}, + {id: 6, content: 'item 6', start: '2013-04-27'} + ]); + var options = {}; + var timeline = new vis.Timeline(container, data, options); +}); diff --git a/www/lib/vis/examples/timeline/other/requirejs/scripts/require.js b/www/lib/vis/examples/timeline/other/requirejs/scripts/require.js new file mode 100644 index 00000000..8de013dc --- /dev/null +++ b/www/lib/vis/examples/timeline/other/requirejs/scripts/require.js @@ -0,0 +1,35 @@ +/* + RequireJS 2.1.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. + Available via the MIT or new BSD license. + see: http://github.com/jrburke/requirejs for details +*/ +var requirejs,require,define; +(function(Y){function H(b){return"[object Function]"===L.call(b)}function I(b){return"[object Array]"===L.call(b)}function x(b,c){if(b){var d;for(d=0;dthis.depCount&&!this.defined){if(H(n)){if(this.events.error)try{e=j.execCb(c,n,b,e)}catch(d){a=d}else e=j.execCb(c,n,b,e);this.map.isDefine&&((b=this.module)&&void 0!==b.exports&&b.exports!==this.exports?e=b.exports:void 0===e&&this.usingExports&&(e=this.exports));if(a)return a.requireMap=this.map,a.requireModules=[this.map.id],a.requireType="define",C(this.error=a)}else e=n;this.exports=e;if(this.map.isDefine&& +!this.ignore&&(p[c]=e,l.onResourceLoad))l.onResourceLoad(j,this.map,this.depMaps);delete k[c];this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a=this.map,b=a.id,d=h(a.prefix);this.depMaps.push(d);s(d,"defined",t(this,function(e){var n,d;d=this.map.name;var v=this.map.parentMap?this.map.parentMap.name:null,f=j.makeRequire(a.parentMap,{enableBuildCallback:!0, +skipMap:!0});if(this.map.unnormalized){if(e.normalize&&(d=e.normalize(d,function(a){return c(a,v,!0)})||""),e=h(a.prefix+"!"+d,this.map.parentMap),s(e,"defined",t(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),d=i(k,e.id)){this.depMaps.push(e);if(this.events.error)d.on("error",t(this,function(a){this.emit("error",a)}));d.enable()}}else n=t(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),n.error=t(this,function(a){this.inited=!0;this.error= +a;a.requireModules=[b];E(k,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&delete k[a.map.id]});C(a)}),n.fromText=t(this,function(e,c){var d=a.name,u=h(d),v=O;c&&(e=c);v&&(O=!1);q(u);r(m.config,b)&&(m.config[d]=m.config[b]);try{l.exec(e)}catch(k){throw Error("fromText eval for "+d+" failed: "+k);}v&&(O=!0);this.depMaps.push(u);j.completeLoad(d);f([d],n)}),e.load(a.name,f,n,m)}));j.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){this.enabling=this.enabled=!0;x(this.depMaps,t(this,function(a, +b){var c,e;if("string"===typeof a){a=h(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=i(N,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;s(a,"defined",t(this,function(a){this.defineDep(b,a);this.check()}));this.errback&&s(a,"error",this.errback)}c=a.id;e=k[c];!r(N,c)&&(e&&!e.enabled)&&j.enable(a,this)}));E(this.pluginMaps,t(this,function(a){var b=i(k,a.id);b&&!b.enabled&&j.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c= +this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){x(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};j={config:m,contextName:b,registry:k,defined:p,urlFetched:S,defQueue:F,Module:W,makeModuleMap:h,nextTick:l.nextTick,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=m.pkgs,c=m.shim,e={paths:!0,config:!0,map:!0};E(a,function(a,b){e[b]?"map"===b?Q(m[b],a,!0,!0):Q(m[b],a,!0):m[b]=a});a.shim&&(E(a.shim,function(a, +b){I(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=j.makeShimExports(a);c[b]=a}),m.shim=c);a.packages&&(x(a.packages,function(a){a="string"===typeof a?{name:a}:a;b[a.name]={name:a.name,location:a.location||a.name,main:(a.main||"main").replace(ga,"").replace(aa,"")}}),m.pkgs=b);E(k,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=h(b))});if(a.deps||a.callback)j.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(Y,arguments)); +return b||a.exports&&Z(a.exports)}},makeRequire:function(a,d){function f(e,c,u){var i,m;d.enableBuildCallback&&(c&&H(c))&&(c.__requireJsBuild=!0);if("string"===typeof e){if(H(c))return C(J("requireargs","Invalid require call"),u);if(a&&r(N,e))return N[e](k[a.id]);if(l.get)return l.get(j,e,a);i=h(e,a,!1,!0);i=i.id;return!r(p,i)?C(J("notloaded",'Module name "'+i+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):p[i]}K();j.nextTick(function(){K();m=q(h(null,a));m.skipMap=d.skipMap; +m.init(e,c,u,{enabled:!0});B()});return f}d=d||{};Q(f,{isBrowser:z,toUrl:function(b){var d=b.lastIndexOf("."),g=null;-1!==d&&(g=b.substring(d,b.length),b=b.substring(0,d));return j.nameToUrl(c(b,a&&a.id,!0),g)},defined:function(b){return r(p,h(b,a,!1,!0).id)},specified:function(b){b=h(b,a,!1,!0).id;return r(p,b)||r(k,b)}});a||(f.undef=function(b){w();var c=h(b,a,!0),d=i(k,b);delete p[b];delete S[c.url];delete X[b];d&&(d.events.defined&&(X[b]=d.events),delete k[b])});return f},enable:function(a){i(k, +a.id)&&q(a).enable()},completeLoad:function(a){var b,c,d=i(m.shim,a)||{},h=d.exports;for(w();F.length;){c=F.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);D(c)}c=i(k,a);if(!b&&!r(p,a)&&c&&!c.inited){if(m.enforceDefine&&(!h||!Z(h)))return y(a)?void 0:C(J("nodefine","No define call for "+a,null,[a]));D([a,d.deps||[],d.exportsFn])}B()},nameToUrl:function(a,b){var c,d,h,f,j,k;if(l.jsExtRegExp.test(a))f=a+(b||"");else{c=m.paths;d=m.pkgs;f=a.split("/");for(j=f.length;0f.attachEvent.toString().indexOf("[native code"))&&!V?(O=!0,f.attachEvent("onreadystatechange", +b.onScriptLoad)):(f.addEventListener("load",b.onScriptLoad,!1),f.addEventListener("error",b.onScriptError,!1)),f.src=d,K=f,D?A.insertBefore(f,D):A.appendChild(f),K=null,f;$&&(importScripts(d),b.completeLoad(c))};z&&M(document.getElementsByTagName("script"),function(b){A||(A=b.parentNode);if(s=b.getAttribute("data-main"))return q.baseUrl||(G=s.split("/"),ba=G.pop(),ca=G.length?G.join("/")+"/":"./",q.baseUrl=ca,s=ba),s=s.replace(aa,""),q.deps=q.deps?q.deps.concat(s):[s],!0});define=function(b,c,d){var i, +f;"string"!==typeof b&&(d=c,c=b,b=null);I(c)||(d=c,c=[]);!c.length&&H(d)&&d.length&&(d.toString().replace(ia,"").replace(ja,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c));if(O){if(!(i=K))P&&"interactive"===P.readyState||M(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return P=b}),i=P;i&&(b||(b=i.getAttribute("data-requiremodule")),f=B[i.getAttribute("data-requirecontext")])}(f?f.defQueue:R).push([b,c,d])};define.amd= +{jQuery:!0};l.exec=function(b){return eval(b)};l(q)}})(this); diff --git a/www/lib/vis/examples/timeline/other/rtl.html b/www/lib/vis/examples/timeline/other/rtl.html new file mode 100644 index 00000000..f53b1802 --- /dev/null +++ b/www/lib/vis/examples/timeline/other/rtl.html @@ -0,0 +1,50 @@ + + + + Timeline | RTL example + + + + + + + +

Timeline RTL support

+ +

Using dir = "rtl" in any parent node

+
+ +

Using options.rtl = true

+
+ + + + \ No newline at end of file diff --git a/www/lib/vis/examples/timeline/other/timezone.html b/www/lib/vis/examples/timeline/other/timezone.html new file mode 100644 index 00000000..8994ba98 --- /dev/null +++ b/www/lib/vis/examples/timeline/other/timezone.html @@ -0,0 +1,80 @@ + + + + Timeline | Time zone + + + + + + + + + +

Time zone

+ +

+ The following demo shows how to display items in local time (default), in UTC, or for a specific time zone offset. By configuring your own moment constructor, you can display items in the time zone that you want. All timelines have the same start and end date. +

+ +

Local time

+
+ +

UTC

+
+ +

UTC +08:00

+
+ + + + + + \ No newline at end of file diff --git a/www/lib/vis/examples/timeline/other/usingReact.html b/www/lib/vis/examples/timeline/other/usingReact.html new file mode 100644 index 00000000..f6d1e1f7 --- /dev/null +++ b/www/lib/vis/examples/timeline/other/usingReact.html @@ -0,0 +1,123 @@ + + + + + React Components in templates + + + +
+ + + + + + + + + + + + + diff --git a/www/lib/vis/examples/timeline/other/verticalScroll.html b/www/lib/vis/examples/timeline/other/verticalScroll.html new file mode 100644 index 00000000..ddf946f0 --- /dev/null +++ b/www/lib/vis/examples/timeline/other/verticalScroll.html @@ -0,0 +1,93 @@ + + + Timeline | Vertical Scroll Option + + + + + + + + + +

Timeline vertical scroll option

+ +

With +verticalScroll: true, +zoomKey: 'ctrlKey' +

+ +
+ +

With +horizontalScroll: true, +verticalScroll: true, +zoomKey: 'ctrlKey' +

+
+ + + + -- cgit v1.2.3