Changeset 16682
- Timestamp:
- 06/04/13 15:05:28 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/js/chart.js
r16668 r16682 26 26 //alert("request ok"); 27 27 line=XML.responseText.split('\n'); 28 dataSource.push(line); 28 dataSource.push(new Array()); 29 n = dataSource.length-1; 30 for(row=0;row<line.length;row++) 31 { 32 rows=line[row].split(','); 33 dataSource[n].push(parseFloat(rows[4])||parseFloat('0')); 34 } 29 35 if (dataSource.length == source.length) 30 36 { … … 82 88 }; 83 89 //This function splits the lines of data per data source 84 var dataGraph = new Array(source.length);90 //var dataGraph = new Array(source.length); 85 91 var Time = new Array(source.length); 86 92 var Temp = new Array(); … … 91 97 for (i=0; i<source.length; i++) 92 98 { 93 dataGraph[i] = new Array(); //dataGraph contains the individual points for each source i99 //dataGraph[i] = new Array(); //dataGraph contains the individual points for each source i 94 100 Time[i] = new Array(); // Time contains the individual time for each sources. 95 101 chart.addSeries({name:source[i], data:[]}); // created a series of data and add name of displayed source … … 98 104 rows=line[row].split(','); 99 105 Temp[row]=rows[0]; 100 dataGraph[i].push(parseFloat(rows[4])||parseFloat('0'));106 //dataGraph[i].push(parseFloat(rows[4])||parseFloat('0')); 101 107 for(T=0;T<Temp.length;T++) 102 108 { … … 169 175 170 176 } 171 for(Graph=0;Graph<data Graph[i].length;Graph++)177 for(Graph=0;Graph<dataSource[i].length;Graph++) 172 178 { 173 179 chart.series[i].addPoint({ // series[0] means index of zero in data; 174 180 x:Time[i][Graph], // Time 175 y:data Graph[i][Graph] // Value181 y:dataSource[i][Graph] // Value 176 182 }) 177 183 }
Note:
See TracChangeset
for help on using the changeset viewer.