Changeset 16131
- Timestamp:
- 05/24/13 16:00:49 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Module/calendar.php
r16130 r16131 84 84 var DataVal = []; 85 85 var source=['Crab','Mrk 501','Mrk 402']; 86 var options = { 87 chart: { 88 renderTo: 'container' /* display to div Graph*/ 89 90 }, 91 92 xAxis: { 93 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"] 94 }, 95 series:[], /* array of Data */ 96 97 remove:function() 98 { 99 return false; 100 }, 101 102 exporting: { /*--------------------*/ 103 buttons: { /* */ 104 exportButton: { /* Export */ 105 menuItems: null, /* to */ 106 onclick: function() { /* PNG.file */ 107 this.exportChart(); /*--------------------*/ 108 } 109 } 110 } 111 }, 112 plotOptions : { 113 114 series : { 115 lineWidth: 3, 116 117 marker : { 118 enabled:false 119 } 120 } 121 } 122 }; 86 123 for(var i=0; i<source.length;i++) 87 124 { … … 195 232 //GrapData(Data,Time); 196 233 } 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:false230 }231 }232 }233 };234 var chart = new Highcharts.Chart(options);235 236 chart.addSeries({name:source[i], data:[]}); // created a series of data and add name of displayed source237 for(var DataCnt=0;DataCnt<Data.length;DataCnt++)238 {239 240 chart.series[i].addPoint({ // series[0] means index of zero in data;241 x:Time[i][DataCnt], // Time242 y:Data[i][DataCnt] // Value243 })244 245 }246 247 248 234 249 235 } … … 254 240 255 241 } 256 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 DataCnt=0;DataCnt<Data[src].length;DataCnt++) 247 { 248 249 chart.series[src].addPoint({ // series[0] means index of zero in data; 250 x:Time[src][DataCnt], // Time 251 y:Data[src][DataCnt] // Value 252 }) 253 254 } 255 } 257 256 258 257 });
Note:
See TracChangeset
for help on using the changeset viewer.