From dacec69d3e9d373895c408fccf0f01c622a67a4b Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Thu, 25 Jul 2013 19:48:47 +0530 Subject: [PATCH 1/2] Format values in Questions/Connections chart --- js/server_status_monitor.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 1ce9e9af8c..93b7ea3be5 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -1189,6 +1189,19 @@ AJAX.registerOnload('server_status_monitor.js', function() { settings.axes.yaxis.tickOptions = { formatter: $.jqplot.byteFormatter(1) // KiB }; + } else if (settings.title === PMA_messages.strQuestions + || settings.title === PMA_messages.strConnections + ) { + settings.axes.yaxis.tickOptions = { + formatter: function(format, val) { + if (Math.abs(val) >= 1000000) + return $.jqplot.sprintf("%.3g M", val/1000000); + else if (Math.abs(val) >= 1000) + return $.jqplot.sprintf("%.3g k", val/1000); + else + return $.jqplot.sprintf("%d", val); + } + }; } settings.series = chartObj.series; From a206fa87e9256b13e3b71d78cb7b7aac005aee7a Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Thu, 25 Jul 2013 19:54:05 +0530 Subject: [PATCH 2/2] Fix bug#4009, y-axis ticks invisible in Questions chart --- themes/pmahomme/css/common.css.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/themes/pmahomme/css/common.css.php b/themes/pmahomme/css/common.css.php index 8ab4fce120..c6c851fe43 100644 --- a/themes/pmahomme/css/common.css.php +++ b/themes/pmahomme/css/common.css.php @@ -2754,3 +2754,9 @@ body .ui-widget { color: #235A81; } +/* over-riding jqplot-yaxis class */ +.jqplot-yaxis { + left:0px !important; + min-width:25px; + width:auto; +}