From f9e197fa77cbafefe4ef88254b31cfe60cf559a7 Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Tue, 28 Aug 2012 23:12:26 +0530 Subject: [PATCH] jqplot: set min, max values for x axis --- js/server_status_monitor.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 8eb955b838..116e52c6b9 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -1044,7 +1044,10 @@ $(function() { renderer: $.jqplot.DateAxisRenderer, tickOptions: { formatString: '%H:%M:%S' - } + }, + min: runtime.xmin, + max: runtime.xmax, + tickInterval: '10 seconds' }, yaxis: { min:0 @@ -1246,10 +1249,8 @@ $(function() { } // update chart options - var interval = (((runtime.xmax - runtime.xmin)/runtime.gridMaxPoints) / 1000); elem.chart['axes']['xaxis']['max'] = runtime.xmax; elem.chart['axes']['xaxis']['min'] = runtime.xmin; - elem.chart['axes']['xaxis']['tickInterval'] = interval + " seconds"; i++; runtime.charts[orderKey].numPoints++; if (runtime.redrawCharts) {