Changeset 16120 for schedule/Module/calendar.php
- Timestamp:
- 05/24/13 15:31:18 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Module/calendar.php
r16119 r16120 86 86 for(var i = 0; i<source.length;i++) 87 87 { 88 xml.open("GET","http://www.fact-project.org/smartfact/index.php?source="+escape(source[i])+"&time="+year+"-"+month+"-"+day,true);89 xml.send();90 88 91 89 if(window.XMLHttpRequest) … … 197 195 //GrapData(Data,Time); 198 196 } 199 var options = { 200 chart: { 201 renderTo: 'container' /* display to div Graph*/ 202 203 }, 204 205 xAxis: { 206 categories:["12PM","1PM","2PM","3PM","4PM","5PM","6PM","7PM","8PM","9PM","10PM","11PM","12AM","1AM","2AM","3AM","4AM","5AM","6AM","7AM","8AM","9AM","10AM","12PM"] 207 }, 208 series:[], /* array of Data */ 209 210 remove:function() 211 { 212 return false; 213 }, 214 215 exporting: { /*--------------------*/ 216 buttons: { /* */ 217 exportButton: { /* Export */ 218 menuItems: null, /* to */ 219 onclick: function() { /* PNG.file */ 220 this.exportChart(); /*--------------------*/ 221 } 222 } 223 } 224 }, 225 plotOptions : { 226 227 series : { 228 lineWidth: 3, 229 230 marker : { 231 enabled:false 232 } 233 } 234 } 235 }; 236 var chart = new Highcharts.Chart(options); 237 for(var src=0;src<source.length;src++) 238 { 239 chart.addSeries({name:source[src], data:[]}); // created a series of data and add name of displayed source 240 for(var i=0;i<Data[src].length;i++) 241 { 242 243 chart.series[src].addPoint({ // series[0] means index of zero in data; 244 x:Time[src][i], // Time 245 y:Data[src][i] // Value 246 }) 247 248 } 249 } 197 198 199 250 200 } 201 } 202 xml.open("GET","http://www.fact-project.org/smartfact/index.php?source="+escape(source[i])+"&time="+year+"-"+month+"-"+day,true); 203 xml.send(); 204 } 205 var options = { 206 chart: { 207 renderTo: 'container' /* display to div Graph*/ 208 209 }, 210 211 xAxis: { 212 categories:["12PM","1PM","2PM","3PM","4PM","5PM","6PM","7PM","8PM","9PM","10PM","11PM","12AM","1AM","2AM","3AM","4AM","5AM","6AM","7AM","8AM","9AM","10AM","12PM"] 213 }, 214 series:[], /* array of Data */ 215 216 remove:function() 217 { 218 return false; 219 }, 220 221 exporting: { /*--------------------*/ 222 buttons: { /* */ 223 exportButton: { /* Export */ 224 menuItems: null, /* to */ 225 onclick: function() { /* PNG.file */ 226 this.exportChart(); /*--------------------*/ 227 } 228 } 229 } 230 }, 231 plotOptions : { 232 233 series : { 234 lineWidth: 3, 235 236 marker : { 237 enabled:false 238 } 239 } 240 } 241 }; 242 var chart = new Highcharts.Chart(options); 243 for(var src=0;src<source.length;src++) 244 { 245 chart.addSeries({name:source[src], data:[]}); // created a series of data and add name of displayed source 246 for(var i=0;i<Data[src].length;i++) 247 { 248 249 chart.series[src].addPoint({ // series[0] means index of zero in data; 250 x:Time[src][i], // Time 251 y:Data[src][i] // Value 252 }) 253 251 254 } 252 255 }
Note:
See TracChangeset
for help on using the changeset viewer.