From 1c38c7cf19311dfc34ac1e2d9a7e601bb5e36391 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 c093fea83a..9da93e2e39 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -1201,6 +1201,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 84f6e72fa7c02623382e1b300474fa4164554a53 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 7c903aed0a..dfbd04f0aa 100644 --- a/themes/pmahomme/css/common.css.php +++ b/themes/pmahomme/css/common.css.php @@ -2811,3 +2811,9 @@ body .ui-widget { color: #235A81; } +/* over-riding jqplot-yaxis class */ +.jqplot-yaxis { + left:0px !important; + min-width:25px; + width:auto; +}