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