Skip to content

Commit

Permalink
chore(examples): generate examples with vis-dev-utils (visjs#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomaash authored and yotamberk committed Oct 5, 2019
1 parent 785bc43 commit cb1f4bb
Show file tree
Hide file tree
Showing 43 changed files with 1,506 additions and 166 deletions.
2 changes: 1 addition & 1 deletion examples/graph2d/08_performance.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</style>

<!-- note: moment.js must be loaded before vis-timeline-graph2d or the embedded version of moment.js is used -->
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>

<script src="../../dist/vis-timeline-graph2d.min.js"></script>
<link href="../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
Expand Down
5 changes: 4 additions & 1 deletion examples/graph2d/14_toggleGroups.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<title>Graph2d | Toggle Groups Example</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">

<meta name="example-screenshot-selector" content="#visualization6" />

<style type="text/css">
body, html {
font-family: sans-serif;
Expand Down Expand Up @@ -142,4 +145,4 @@ <h2>Graph2d | Groups Example</h2>
graph2d5.setOptions({groups:{visibility:{0:false, 1:false, 2:false, 3:false, "__ungrouped__":true}}})
</script>
</body>
</html>
</html>
2 changes: 2 additions & 0 deletions examples/timeline/dataHandling/loadExternalData.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<head>
<title>Timeline | External data</title>

<meta name="example-screenshot-selector" content="body" />

<style type="text/css">
body, html {
font-family: sans-serif;
Expand Down
4 changes: 2 additions & 2 deletions examples/timeline/editing/itemsAlwaysDraggable.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
</head>
<body>
<p>The <code>itemsAlwaysDraggable</code> option allows to drag items around without first selecting them. When <code>itemsAlwaysDraggable.range</code> is set to <code>true</code>, the range can be changed without selection as well.</p>
<div id="mytimeline"></div>
<div id="visualization"></div>

<script>
var container = document.getElementById('mytimeline'),
var container = document.getElementById('visualization'),
items = new vis.DataSet();

for (var i = 10; i >= 0; i--) {
Expand Down
2 changes: 1 addition & 1 deletion examples/timeline/editing/overrideEditingItems.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Timeline | Individual editable items</title>
<title>Timeline | Individual editable items (override)</title>

<style>
body, html {
Expand Down
2 changes: 2 additions & 0 deletions examples/timeline/editing/tooltipOnItemChange.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<head>
<title>Timeline | Tooltip on item onUpdateTime Option</title>

<meta name="example-screenshot-selector" content="#mytimeline1" />

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="../../../dist/vis-timeline-graph2d.min.js"></script>
<link href="../../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
Expand Down
4 changes: 2 additions & 2 deletions examples/timeline/editing/updateDataOnEvent.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div id="customTime">&nbsp;</div>
<p></p>

<div id="mytimeline"></div>
<div id="visualization"></div>


<script>
Expand All @@ -49,7 +49,7 @@
};

// create a timeline
var container = document.getElementById('mytimeline');
var container = document.getElementById('visualization');
timeline = new vis.Timeline(container, data, options);

timeline.addCustomTime(new Date());
Expand Down
2 changes: 1 addition & 1 deletion examples/timeline/groups/groups.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</style>

<!-- note: moment.js must be loaded before vis-timeline-graph2d or the embedded version of moment.js is used -->
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>

<script src="../../../dist/vis-timeline-graph2d.min.js"></script>
<link href="../../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
Expand Down
2 changes: 1 addition & 1 deletion examples/timeline/groups/nestedGroups.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</style>

<!-- note: moment.js must be loaded before vis-timeline-graph2d or the embedded version of moment.js is used -->
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>

<script src="../../../dist/vis-timeline-graph2d.min.js"></script>
<link href="../../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
Expand Down
6 changes: 3 additions & 3 deletions examples/timeline/groups/nestedThreeLevels.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>

<head>
<title>Timeline | Nested Groups example</title>
<title>Timeline | Nested Groups example (3 levels)</title>

<style>
body,
Expand All @@ -19,7 +19,7 @@
</style>

<!-- note: moment.js must be loaded before vis-timeline-graph2d or the embedded version of moment.js is used -->
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>

<script src="../../../dist/vis-timeline-graph2d.min.js"></script>
<link href="../../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
Expand Down Expand Up @@ -191,4 +191,4 @@
</script>
</body>

</html>
</html>
6 changes: 3 additions & 3 deletions examples/timeline/groups/verticalItemsHide.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<title>Timeline | A lot of grouped data</title>
<title>Timeline | Vertical Items Hide</title>

<script src="../../../docs/js/jquery.min.js"></script>
<script src="../../../dist/vis-timeline-graph2d.min.js"></script>
Expand All @@ -25,7 +25,7 @@ <h2>visible items:</h2>
<h3 id="visibleItemsContainer"></h3>
</div>

<div id="mytimeline"></div>
<div id="visualization"></div>
<br>

<script>
Expand Down Expand Up @@ -107,7 +107,7 @@ <h3 id="visibleItemsContainer"></h3>
};

// create a Timeline
var container = document.getElementById('mytimeline');
var container = document.getElementById('visualization');
timeline = new vis.Timeline(container, null, options);
timeline.setGroups(groups);
timeline.setItems(items);
Expand Down
8 changes: 4 additions & 4 deletions examples/timeline/groups/visibleGroups.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>

<head>
<title>Timeline | A lot of grouped data</title>
<title>Timeline | Visible Groups</title>

<script src="../../../docs/js/jquery.min.js"></script>
<script src="../../../dist/vis-timeline-graph2d.min.js"></script>
Expand All @@ -26,7 +26,7 @@ <h3 id="visibleGroupsContainer"></h3>
<h2>(Scroll with the mouse and see the items being focus automatically on the timeline)</h2>
</div>

<div id="mytimeline"></div>
<div id="visualization"></div>
<br>

<script>
Expand Down Expand Up @@ -77,7 +77,7 @@ <h2>(Scroll with the mouse and see the items being focus automatically on the ti
}

// create a Timeline
var container = document.getElementById('mytimeline');
var container = document.getElementById('visualization');
timeline = new vis.Timeline(container, null, options);
timeline.setGroups(groups);
timeline.setItems(items);
Expand Down Expand Up @@ -110,4 +110,4 @@ <h2>(Scroll with the mouse and see the items being focus automatically on the ti

</body>

</html>
</html>
4 changes: 3 additions & 1 deletion examples/timeline/interaction/clickToUse.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<head>
<title>Timeline | Click to use</title>

<meta name="example-screenshot-selector" content="#main" />

<style>
body, html {
font-family: arial, sans-serif;
Expand Down Expand Up @@ -70,4 +72,4 @@ <h1>Timeline click to use</h1>

</script>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions examples/timeline/interaction/rollingMode.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@

<h1><i id="icon">&#9974;</i>Timeline rolling mode option</h1>

<div id="mytimeline"></div>
<div id="visualization"></div>


<script>
var container = document.getElementById('mytimeline');
var container = document.getElementById('visualization');

var items = new vis.DataSet();

Expand Down
2 changes: 2 additions & 0 deletions examples/timeline/items/tooltip.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<head>
<title>Timeline | Tooltips</title>

<meta name="example-screenshot-selector" content="#tooltips" />

<style type="text/css">
body, html {
font-family: sans-serif;
Expand Down
4 changes: 2 additions & 2 deletions examples/timeline/items/tooltipTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<h1>Tooltip Templates</h1>

<div id="tooltips"></div>
<div id="visualization"></div>
<script type="text/javascript">
var items = new vis.DataSet([{
id: 1,
Expand All @@ -39,7 +39,7 @@ <h1>Tooltip Templates</h1>
}
};

var element = document.getElementById('tooltips');
var element = document.getElementById('visualization');

// Timeline object
var timelineTooltips = new vis.Timeline(element, items, options);
Expand Down
6 changes: 3 additions & 3 deletions examples/timeline/items/visibleFrameTemplateContent.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
</head>
<body>

<div id="myTimeline"></div>
<div id="visualization"></div>

<script type="text/javascript">
// DOM element where the Timeline will be attached
var container = document.getElementById('myTimeline');
var container = document.getElementById('visualization');

// Create a DataSet (allows two way data-binding)
var items = new vis.DataSet([
Expand All @@ -64,4 +64,4 @@
var timeline = new vis.Timeline(container, items, options);
</script>
</body>
</html>
</html>
10 changes: 5 additions & 5 deletions examples/timeline/other/clustering.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
</style>

<!-- note: moment.js must be loaded before vis-timeline-graph2d or the embedded version of moment.js is used -->
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>

<script src="../../../dist/vis-timeline-graph2d.min.js"></script>
<link href="../../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />

<script src="//code.jquery.com/jquery-1.12.4.js"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p>
Expand Down Expand Up @@ -243,4 +243,4 @@
});
</script>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions examples/timeline/other/customTimeBarsTooltip.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Timeline | Show current and custom time bars</title>
<title>Timeline | Show current and custom time bars tooltip</title>

<style type="text/css">
body, html {
Expand Down Expand Up @@ -92,4 +92,4 @@

</script>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions examples/timeline/other/dataAttributes.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Timeline | Basic demo</title>
<title>Timeline | Data Attributes</title>

<style type="text/css">
body, html {
Expand Down Expand Up @@ -41,4 +41,4 @@
var timeline = new vis.Timeline(container, items, options);
</script>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions examples/timeline/other/dataAttributesAll.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Timeline | Basic demo</title>
<title>Timeline | Data Attributes All</title>

<style type="text/css">
body, html {
Expand Down Expand Up @@ -41,4 +41,4 @@
var timeline = new vis.Timeline(container, items, options);
</script>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions examples/timeline/other/drag_drop.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h1>Timeline Drag & Drop Example</h1>

<p>For this to work, you will have to define your own <code>'dragstart'</code> 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 <code>dataTransfer</code> - notice you can set the item's information as you want this way.</p>

<div id="mytimeline" ></div>
<div id="visualization" ></div>

<div class='items-panel'>
<div class='side'>
Expand Down Expand Up @@ -138,7 +138,7 @@ <h3>Object with "target:'item'":</h3>
};

// create a Timeline
var container = document.getElementById('mytimeline');
var container = document.getElementById('visualization');
timeline1 = new vis.Timeline(container, items, groups, options);

function handleDragStart(event) {
Expand Down
2 changes: 1 addition & 1 deletion examples/timeline/other/functionLabelFormats.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</style>

<!-- note: moment.js must be loaded before vis-timeline-graph2d or the embedded version of moment.js is used -->
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>

<script src="../../../dist/vis-timeline-graph2d.min.js"></script>
<link href="../../../dist/vis-timeline-graph2d.min.css" rel="stylesheet" type="text/css" />
Expand Down
4 changes: 2 additions & 2 deletions examples/timeline/other/groupsPerformance.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1>Timeline grouping performance</h1>
Current number of items: <span id='count'>100</span>
</p>

<div id="mytimeline"></div>
<div id="visualization"></div>

<script>
/**
Expand Down Expand Up @@ -98,7 +98,7 @@ <h1>Timeline grouping performance</h1>
};

// create a Timeline
var container = document.getElementById('mytimeline');
var container = document.getElementById('visualization');
timeline = new vis.Timeline(container, null, options);
timeline.setGroups(groups);
timeline.setItems(items);
Expand Down
Loading

0 comments on commit cb1f4bb

Please sign in to comment.