Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit74970a8

Browse files
committed
Update Javascript
1 parentd38f5d0 commit74970a8

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

‎site.js‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,21 @@ $(document).ready(function (){
9494
// DOM element where the Timeline will be attached
9595
varcontainer=document.getElementById('visualization');
9696

97+
// add your project here with the following format
98+
//
99+
// '<groupname> : [
100+
// { content:'<text>', start: <date>, end: <date>, py2:<true|false>},
101+
// ...
102+
// ]
97103
vardata={
98104
'cpython':[
99105
{content:'Remaining Python 2.7 support',start:Date.now(),end:'2020-01-01'},
100106
],
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'},
106112
],
107113
'matplotlib':[
108114
{content:'matplotlib 2.x',start:'2015-06-01',end:'2018-06-01',py2:true},
@@ -123,8 +129,8 @@ $(document).ready(function (){
123129

124130

125131
vargroups=newvis.DataSet();
126-
g=0;
127-
i=0;
132+
varg=0;
133+
vari=0;
128134
for(vargnameindata){
129135
g++;
130136
groups.add({id:g,content:gname});
@@ -142,17 +148,14 @@ $(document).ready(function (){
142148
varoptions={};
143149

144150
varoptions={
145-
groupOrder:'group'// groupOrder can be a property name or a sorting function
151+
groupOrder:'group'
146152
};
147153

148154
// Create a Timeline
149155
vartimeline=newvis.Timeline(container,items,options);
150156
timeline.setGroups(groups);
151157
timeline.setItems(items);
152158
timeline.addCustomTime(Date.parse('2020-01-01'))
153-
window.groups=groups;
154-
window.items=items;
155-
window.timeline=timeline;
156159

157160
});
158161

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp