function Graph(id_pannel, path, header_size){ this.path = path; this.id_pannel = id_pannel; // Hide every header during initialisation var false_tab = []; for(i=0; i max_data_x) { end_x_highlight = max_data_x; } highlight_period(start_x_highlight,end_x_highlight); // calculate start of highlight for next Saturday w += 7*24*3600*1000; } }, visibility: false_tab }); this.graph = g2; this.set_Visibility = setVis; this.set_Visibility_andHide = setVis_andHide; onclick = function(ev) { if (g2.isSeriesLocked()) { g2.clearSelection(); } else { g2.setSelection(g2.getSelection(), g2.getHighlightSeries(), true); } }; g2.updateOptions({clickCallback: onclick}, true); var linear = document.getElementById("linear"); var log = document.getElementById("log"); linear.onclick = function() { setLog(false); } log.onclick = function() { setLog(true); } var setLog = function(val) { g2.updateOptions({ logscale: val }); linear.disabled = !val; log.disabled = val; } function unzoomGraph() { g2.updateOptions({ dateWindow:null, valueRange:null }); } // display the top headers function setVis(max_display){ var headings = this.graph.getLabels(); headings.splice(0,1); var sorted_list = new Array(); var today = new Date().getDate(); //today = new Date().getDate()-1; // Could take the top from yesterday so that we can see the current evolution for( i=0; i