Changeset 16288 for schedule/Module
- Timestamp:
- 05/27/13 14:54:09 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Module/calendar.php
r16275 r16288 169 169 for(var i=0; i<source.length;i++) 170 170 { 171 Time[i] = new Array(); 172 DataValue[i] = new Array(); 171 173 if(window.XMLHttpRequest) 172 174 { … … 180 182 { 181 183 if(xml.readyState==4 && xml.status ==200) 182 {184 { 183 185 document.getElementById('data').innerHTML=DataValue; 184 186 … … 213 215 } 214 216 else 215 DataValue[ Data]=parseFloat(DataVal[Data]);217 DataValue[i][Data]=parseFloat(DataVal[Data]); 216 218 } 217 219 … … 227 229 if(MinTime[ConTime]==8) 228 230 { 231 Time[i][ConTime]=HourTime[ConTime]+24+'.'+'.08'; 232 } 233 else 234 Time[i][ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime]; 235 } 236 else if(HourTime[ConTime]==1) 237 { 238 if(MinTime[ConTime]==8) 239 { 240 Time[i][ConTime]=HourTime[ConTime]+24+'.'+'.08'; 241 } 242 else 243 Time[i][ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime]; 244 } 245 else if(HourTime[ConTime]==2) 246 { 247 if(MinTime[ConTime]==8) 248 { 249 Time[i][ConTime]=HourTime[ConTime]+24+'.'+'.08'; 250 } 251 else 252 Time[i][ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime]; 253 } 254 else if(HourTime[ConTime]==3) 255 { 256 if(MinTime[ConTime]==8) 257 { 258 Time[i][ConTime]=HourTime[ConTime]+24+'.'+'.08'; 259 } 260 else 261 Time[i][ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime]; 262 } 263 else if(HourTime[ConTime]==4) 264 { 265 if(MinTime[ConTime]==8) 266 { 229 267 Time[ConTime]=HourTime[ConTime]+24+'.'+'.08'; 230 268 } … … 232 270 Time[ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime]; 233 271 } 234 else if(HourTime[ConTime]==1)235 {236 if(MinTime[ConTime]==8)237 {238 Time[ConTime]=HourTime[ConTime]+24+'.'+'.08';239 }240 else241 Time[ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime];242 }243 else if(HourTime[ConTime]==2)244 {245 if(MinTime[ConTime]==8)246 {247 Time[ConTime]=HourTime[ConTime]+24+'.'+'.08';248 }249 else250 Time[ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime];251 }252 else if(HourTime[ConTime]==3)253 {254 if(MinTime[ConTime]==8)255 {256 Time[ConTime]=HourTime[ConTime]+24+'.'+'.08';257 }258 else259 Time[ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime];260 }261 else if(HourTime[ConTime]==4)262 {263 if(MinTime[ConTime]==8)264 {265 Time[ConTime]=HourTime[ConTime]+24+'.'+'.08';266 }267 else268 Time[ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime];269 }270 272 else if(HourTime[ConTime]==5) 271 273 { 272 274 if(MinTime[ConTime]==8) 273 275 { 274 Time[ ConTime]=HourTime[ConTime]+24+'.'+'.08';275 } 276 else 277 Time[ ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime];276 Time[i][ConTime]=HourTime[ConTime]+24+'.'+'.08'; 277 } 278 else 279 Time[i][ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime]; 278 280 } 279 281 else if(HourTime[ConTime]==6) … … 281 283 if(MinTime[ConTime]==8) 282 284 { 283 Time[ ConTime]=HourTime[ConTime]+24+'.'+'.08';284 } 285 else 286 Time[ ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime];285 Time[i][ConTime]=HourTime[ConTime]+24+'.'+'.08'; 286 } 287 else 288 Time[i][ConTime]=HourTime[ConTime]+24+'.'+MinTime[ConTime]; 287 289 } 288 290 else 289 Time[ ConTime]=HourTime[ConTime]+'.'+MinTime[ConTime];291 Time[i][ConTime]=HourTime[ConTime]+'.'+MinTime[ConTime]; 290 292 291 293 } … … 294 296 295 297 } 296 var chart=new Highcharts.Chart(options);297 for(var src=0;src<i;src++)298 {299 chart.addSeries({name:source[src], data:[]}); // created a series of data and add name of displayed source300 for(var DataCnt=0;DataCnt<DataValue.length;DataCnt++)301 {302 303 chart.series[src].addPoint({ // series[0] means index of zero in data;304 x:Time[DataCnt], // Time305 y:DataValue[DataCnt] // Value306 })307 308 309 }310 311 }312 313 298 } 314 299 } … … 316 301 xml.send(); 317 302 } 303 var chart=new Highcharts.Chart(options); 304 for(var src=0;src<source.length;src++) 305 { 306 chart.addSeries({name:source[src], data:[]}); // created a series of data and add name of displayed source 307 for(var DataCnt=0;DataCnt<DataValue[src].length;DataCnt++) 308 { 309 310 chart.series[src].addPoint({ // series[0] means index of zero in data; 311 x:Time[src][DataCnt], // Time 312 y:DataValue[src][DataCnt] // Value 313 }) 314 315 316 } 317 318 } 318 319 //Charts(DataValue[[i]],Time); 319 320 $('#Graph').fadeOut();
Note:
See TracChangeset
for help on using the changeset viewer.