Changeset 16227
- Timestamp:
- 05/25/13 00:55:39 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Module/calendar.php
r16226 r16227 108 108 { 109 109 110 lines[i]=xml.responseText.split("\n"); 110 lines[i]=xml.responseText.split("\n"); 111 for(var row=0;row<lines[i].length;row++) 112 { 113 var splitted=lines[row].split(','); 114 Time1[row]=splitted[0]; 115 for(var SplittedTime=0;SplittedTime<Time1.length;SplittedTime++) 116 { 117 var SplitTime=Time1[SplittedTime].split(':'); 118 TimeColon[SplittedTime]=SplitTime[0]; 119 MinTime[SplittedTime]=(parseInt(SplitTime[1]/60*100)||parseInt("0")); 120 for(var TimeT=0;TimeT<TimeColon.length;TimeT++) 121 { 122 var SplittedT=TimeColon[TimeT].split('T'); 123 HourTime[TimeT]=(parseFloat(SplittedT[1])||parseInt('0')); 124 } 125 } 126 DataVal[row]=(parseFloat(splitted[4])||parseInt('0')); 127 //document.getElementById('data').innerHTML=DataValue; 128 129 for(var Data=0; Data<DataVal.length;Data++) 130 { 131 if(DataVal[Data]==0) 132 { 133 134 } 135 else 136 DataValue.push(parseFloat(DataVal[Data])); 137 } 138 139 140 for(var ConTime=1;ConTime<HourTime.length-1;ConTime++) 141 { 142 if(HourTime[ConTime]==0) 143 { 144 if(MinTime[ConTime]==8) 145 { 146 Time.push(HourTime[ConTime]+24+'.'+'.08'); 147 } 148 else 149 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 150 } 151 else if(HourTime[ConTime]==1) 152 { 153 if(MinTime[ConTime]==8) 154 { 155 Time.push(HourTime[ConTime]+24+'.'+'.08'); 156 } 157 else 158 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 159 } 160 else if(HourTime[ConTime]==2) 161 { 162 if(MinTime[ConTime]==8) 163 { 164 Time.push(HourTime[ConTime]+24+'.'+'.08'); 165 } 166 else 167 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 168 } 169 else if(HourTime[ConTime]==3) 170 { 171 if(MinTime[ConTime]==8) 172 { 173 Time.push(HourTime[ConTime]+24+'.'+'.08'); 174 } 175 else 176 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 177 } 178 else if(HourTime[ConTime]==4) 179 { 180 if(MinTime[ConTime]==8) 181 { 182 Time.push(HourTime[ConTime]+24+'.'+'.08'); 183 } 184 else 185 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 186 } 187 else if(HourTime[ConTime]==5) 188 { 189 if(MinTime[ConTime]==8) 190 { 191 Time.push(HourTime[ConTime]+24+'.'+'.08'); 192 } 193 else 194 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 195 } 196 else if(HourTime[ConTime]==6) 197 { 198 if(MinTime[ConTime]==8) 199 { 200 Time.push(HourTime[ConTime]+24+'.'+'.08'); 201 } 202 else 203 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 204 } 205 else 206 Time.push(HourTime[ConTime]+'.'+MinTime[ConTime]); 207 208 } 209 210 //GrapData(Data,Time); 211 212 }; 111 213 112 214 … … 121 223 function Charts(line) 122 224 { 123 for(var row=0;row<lines.length;row++) 124 { 125 var splitted=line[row].split(','); 126 Time1[row]=splitted[0]; 127 for(var SplittedTime=0;SplittedTime<Time1.length;SplittedTime++) 128 { 129 var SplitTime=Time1[SplittedTime].split(':'); 130 TimeColon[SplittedTime]=SplitTime[0]; 131 MinTime[SplittedTime]=(parseInt(SplitTime[1]/60*100)||parseInt("0")); 132 for(var TimeT=0;TimeT<TimeColon.length;TimeT++) 133 { 134 var SplittedT=TimeColon[TimeT].split('T'); 135 HourTime[TimeT]=(parseFloat(SplittedT[1])||parseInt('0')); 136 } 137 } 138 DataVal[row]=(parseFloat(splitted[4])||parseInt('0')); 139 //document.getElementById('data').innerHTML=DataValue; 140 141 for(var Data=0; Data<DataVal.length;Data++) 142 { 143 if(DataVal[Data]==0) 144 { 145 146 } 147 else 148 DataValue.push(parseFloat(DataVal[Data])); 149 } 150 151 152 for(var ConTime=1;ConTime<HourTime.length-1;ConTime++) 153 { 154 if(HourTime[ConTime]==0) 155 { 156 if(MinTime[ConTime]==8) 157 { 158 Time.push(HourTime[ConTime]+24+'.'+'.08'); 159 } 160 else 161 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 162 } 163 else if(HourTime[ConTime]==1) 164 { 165 if(MinTime[ConTime]==8) 166 { 167 Time.push(HourTime[ConTime]+24+'.'+'.08'); 168 } 169 else 170 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 171 } 172 else if(HourTime[ConTime]==2) 173 { 174 if(MinTime[ConTime]==8) 175 { 176 Time.push(HourTime[ConTime]+24+'.'+'.08'); 177 } 178 else 179 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 180 } 181 else if(HourTime[ConTime]==3) 182 { 183 if(MinTime[ConTime]==8) 184 { 185 Time.push(HourTime[ConTime]+24+'.'+'.08'); 186 } 187 else 188 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 189 } 190 else if(HourTime[ConTime]==4) 191 { 192 if(MinTime[ConTime]==8) 193 { 194 Time.push(HourTime[ConTime]+24+'.'+'.08'); 195 } 196 else 197 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 198 } 199 else if(HourTime[ConTime]==5) 200 { 201 if(MinTime[ConTime]==8) 202 { 203 Time.push(HourTime[ConTime]+24+'.'+'.08'); 204 } 205 else 206 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 207 } 208 else if(HourTime[ConTime]==6) 209 { 210 if(MinTime[ConTime]==8) 211 { 212 Time.push(HourTime[ConTime]+24+'.'+'.08'); 213 } 214 else 215 Time.push(HourTime[ConTime]+24+'.'+MinTime[ConTime]); 216 } 217 else 218 Time.push(HourTime[ConTime]+'.'+MinTime[ConTime]); 219 220 } 221 222 //GrapData(Data,Time); 223 224 }; 225 225 226 var options = { 226 227 chart: {
Note:
See TracChangeset
for help on using the changeset viewer.