Browse Source

Added comments on months in the JavaScript Date object being zero based.

css_transitions
jos 10 years ago
parent
commit
a8b664120d
6 changed files with 9 additions and 0 deletions
  1. +1
    -0
      examples/timeline/08_edit_items.html
  2. +1
    -0
      examples/timeline/09_order_groups.html
  3. +1
    -0
      examples/timeline/10_limit_move_and_zoom.html
  4. +1
    -0
      examples/timeline/11_points.html
  5. +4
    -0
      examples/timeline/12_custom_styling.html
  6. +1
    -0
      examples/timeline/15_item_class_names.html

+ 1
- 0
examples/timeline/08_edit_items.html View File

@ -18,6 +18,7 @@
<div id="log"></div>
<script type="text/javascript">
// note that months are zero-based in the JavaScript Date object, so month 3 is April
var items = new vis.DataSet([
{id: 1, content: 'item 1', start: new Date(2013, 3, 20)},
{id: 2, content: 'item 2', start: new Date(2013, 3, 14)},

+ 1
- 0
examples/timeline/09_order_groups.html View File

@ -33,6 +33,7 @@
]);
// create a dataset with items
// note that months are zero-based in the JavaScript Date object, so month 3 is April
var items = new vis.DataSet([
{id: 0, group: 0, content: 'item 0', start: new Date(2014, 3, 17), end: new Date(2014, 3, 21)},
{id: 1, group: 0, content: 'item 1', start: new Date(2014, 3, 19), end: new Date(2014, 3, 20)},

+ 1
- 0
examples/timeline/10_limit_move_and_zoom.html View File

@ -27,6 +27,7 @@
<script>
// create some items
// note that months are zero-based in the JavaScript Date object, so month 4 is May
var items = [
{'start': new Date(2012, 4, 25), 'content': 'First'},
{'start': new Date(2012, 4, 26), 'content': 'Last'}

+ 1
- 0
examples/timeline/11_points.html View File

@ -22,6 +22,7 @@
<script type="text/javascript">
var container = document.getElementById('visualization');
// note that months are zero-based in the JavaScript Date object
var items = [
{start: new Date(1939,8,1), content: 'German Invasion of Poland'},
{start: new Date(1940,4,10), content: 'Battle of France and the Low Countries'},

+ 4
- 0
examples/timeline/12_custom_styling.html View File

@ -65,6 +65,8 @@
<script type="text/javascript">
var container = document.getElementById('visualization');
// note that months are zero-based in the JavaScript Date object
var items = [
{start: new Date(2010,7,23), content: '<div>Conversation</div><img src="img/community-users-icon.png" style="width:32px; height:32px;">'},
{start: new Date(2010,7,23,23,0,0), content: '<div>Mail from boss</div><img src="img/mail-icon.png" style="width:32px; height:32px;">'},
@ -75,6 +77,7 @@
{start: new Date(2010,7,31), end: new Date(2010,8,3), content: 'Traject B'},
{start: new Date(2010,8,4,12,0,0), content: '<div>Report</div><img src="img/attachment-icon.png" style="width:32px; height:32px;">'}
];
var options = {
editable: true,
margin: {
@ -82,6 +85,7 @@
axis: 40
}
};
var timeline = new vis.Timeline(container, items, options);
</script>
</body>

+ 1
- 0
examples/timeline/15_item_class_names.html View File

@ -73,6 +73,7 @@
<script type="text/javascript">
// create data
// note that months are zero-based in the JavaScript Date object
var data = [
{
'start': new Date(2012,7,19),

Loading…
Cancel
Save