Changeset 15702
- Timestamp:
- 05/20/13 06:48:13 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Module/calendar.php
r15701 r15702 101 101 newdata=newline.join(","); 102 102 document.getElementById('data').innerHTML=newdata; 103 /*for(var c=0;c<newline.length;c++)104 {105 arr[c];106 };107 var chart = new Highcharts.Chart({108 109 110 chart: {111 renderTo: 'container' /* display to div Graph*/112 /* },113 114 xAxis: {115 labels: {116 rotation: -45,117 align: 'right',118 },119 categories:["","","","","","","","19:00","20:00","21:00","22:00","23:00","24:00","1:00","2:00","3:00","4:00","5:00","6:00","7:00"]},120 series:[], /* array of Data */121 122 /*remove:function()123 {124 return false;125 },126 127 exporting: { /*--------------------*/128 /*buttons: { /* */129 /*exportButton: { /* Export */130 /* menuItems: null, /* to */131 /* onclick: function() { /* PNG.file */132 /* this.exportChart(); /*--------------------*/133 /*}134 }135 }136 },137 138 plotOptions:139 {140 series: {141 marker: {142 enabled: true,143 144 }145 146 }147 },148 149 150 151 });152 /*$('#add').click(function(){153 154 });*/155 103 $(function () { 156 var data = '[{"name":"Station 1","data":"1360191600,398.625"},{"name":"Station 1","data":"1360192500,398.625"},{"name":"Station 1","data":"1360193400,398.25"},{"name":"Station 1","data":"1360194300,397.375"},{"name":"Station 1","data":"1360195200,397.5"},{"name":"Station 1","data":"1360196100,397.5"},{"name":"Station 1","data":"1360199700,396.75"},{"name":"Station 1","data":"1360200600,397"}]';104 //var data = '[{"name":"Station 1","data":"1360191600,398.625"},{"name":"Station 1","data":"1360192500,398.625"},{"name":"Station 1","data":"1360193400,398.25"},{"name":"Station 1","data":"1360194300,397.375"},{"name":"Station 1","data":"1360195200,397.5"},{"name":"Station 1","data":"1360196100,397.5"},{"name":"Station 1","data":"1360199700,396.75"},{"name":"Station 1","data":"1360200600,397"}]'; 157 105 158 106 … … 167 115 }; 168 116 169 data = JSON.parse(data);117 newline = JSON.parse(newline); 170 118 var names = []; 171 $.each( data, function (i, ligne) {119 $.each(newline, function (i, ligne) { 172 120 var ind = names.indexOf(ligne.name), 173 splited = ligne. data.split(','),121 splited = ligne.newline.split(','), 174 122 x = parseFloat(splited[0]), 175 123 y = parseFloat(splited[1]); … … 182 130 } 183 131 if(!isNaN(x) && !isNaN(y)){ 184 options.series[ind]. data.push([x,y]);132 options.series[ind].newline.push([x,y]); 185 133 } 186 134 });
Note:
See TracChangeset
for help on using the changeset viewer.