@@ -94,15 +94,21 @@ $(document).ready(function (){
94
94
// DOM element where the Timeline will be attached
95
95
var container = document . getElementById ( 'visualization' ) ;
96
96
97
+ // add your project here with the following format
98
+ //
99
+ // '<groupname> : [
100
+ // { content:'<text>', start: <date>, end: <date>, py2:<true|false>},
101
+ // ...
102
+ // ]
97
103
var data = {
98
104
'cpython' :[
99
105
{ content :'Remaining Python 2.7 support' , start : Date . now ( ) , end : '2020-01-01' } ,
100
106
] ,
101
- 'ipython ' :[
102
- { content : 'ipython 5.x LTS' , start : '2016-06-01' , end :'2019-06-01' , py2 :true } ,
103
- { content : 'ipython 6.x' , start : '2017-01-01' , end :'2018-01-01' } ,
104
- { content : 'ipython 7.x' , start : '2018-01-01' , end :'2019-06-12' } ,
105
- { content : 'ipython 8.x' , start : '2019-06-12' , end :'2020-06-01' } ,
107
+ 'IPython ' :[
108
+ { content : 'IPython 5.x LTS' , start : '2016-06-01' , end :'2019-06-01' , py2 :true } ,
109
+ { content : 'IPython 6.x' , start : '2017-01-01' , end :'2018-01-01' } ,
110
+ { content : 'IPython 7.x' , start : '2018-01-01' , end :'2019-06-12' } ,
111
+ { content : 'IPython 8.x' , start : '2019-06-12' , end :'2020-06-01' } ,
106
112
] ,
107
113
'matplotlib' :[
108
114
{ content : 'matplotlib 2.x' , start : '2015-06-01' , end :'2018-06-01' , py2 :true } ,
@@ -123,8 +129,8 @@ $(document).ready(function (){
123
129
124
130
125
131
var groups = new vis . DataSet ( ) ;
126
- g = 0 ;
127
- i = 0 ;
132
+ var g = 0 ;
133
+ var i = 0 ;
128
134
for ( var gname in data ) {
129
135
g ++ ;
130
136
groups . add ( { id : g , content : gname } ) ;
@@ -142,17 +148,14 @@ $(document).ready(function (){
142
148
var options = { } ;
143
149
144
150
var options = {
145
- groupOrder : 'group' // groupOrder can be a property name or a sorting function
151
+ groupOrder : 'group'
146
152
} ;
147
153
148
154
// Create a Timeline
149
155
var timeline = new vis . Timeline ( container , items , options ) ;
150
156
timeline . setGroups ( groups ) ;
151
157
timeline . setItems ( items ) ;
152
158
timeline . addCustomTime ( Date . parse ( '2020-01-01' ) )
153
- window . groups = groups ;
154
- window . items = items ;
155
- window . timeline = timeline ;
156
159
157
160
} ) ;
158
161
0 commit comments