diff options
author | Marc Delisle <marc@infomarc.info> | 2012-05-11 23:38:35 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2012-05-11 23:38:35 +0400 |
commit | 8b7b8a8ffe0c2b4a916a0352bc21c0b103048397 (patch) | |
tree | b3c1107a204714a3fd668d9a5f322fe87884f674 /js | |
parent | a44ee5909345fe24adcbd498ecc9255e36f66d58 (diff) |
Server status queries chart, with jqplot
Fix needed: legend wrongly displayed over the right border
Diffstat (limited to 'js')
-rw-r--r-- | js/functions.js | 6 | ||||
-rw-r--r-- | js/server_status.js | 38 | ||||
-rw-r--r-- | js/sql.js | 2 |
3 files changed, 8 insertions, 38 deletions
diff --git a/js/functions.js b/js/functions.js index b942bcd6f9..59043c5369 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1686,7 +1686,7 @@ function PMA_createChart(passedSettings) /* - * Creates a Profiling Chart. Used in server_status.js + * Creates a Profiling Chart. Used in server_status_monitor.js */ function PMA_createProfilingChart(data, options) { @@ -1725,9 +1725,9 @@ function PMA_createProfilingChart(data, options) /* * Creates a Profiling Chart with jqplot. Used in sql.js */ -function PMA_createProfilingChartJqplot(data, options) +function PMA_createProfilingChartJqplot(target, data) { - return $.jqplot('profilingchart', [data], + return $.jqplot(target, [data], { seriesDefaults: { renderer: $.jqplot.PieRenderer, diff --git a/js/server_status.js b/js/server_status.js index 5869093bcc..438ed416c5 100644 --- a/js/server_status.js +++ b/js/server_status.js @@ -452,40 +452,10 @@ $(function() { cdata.push([key, parseInt(value)]); }); - queryPieChart = PMA_createChart({ - chart: { - renderTo: 'serverstatusquerieschart' - }, - title: { - text: '', - margin: 0 - }, - series: [{ - type: 'pie', - name: PMA_messages['strChartQueryPie'], - data: cdata - }], - plotOptions: { - pie: { - allowPointSelect: true, - cursor: 'pointer', - dataLabels: { - enabled: true, - formatter: function() { - return '<b>' + this.point.name +'</b><br/> ' + - Highcharts.numberFormat(this.percentage, 2) + ' %'; - } - } - } - }, - tooltip: { - formatter: function() { - return '<b>' + this.point.name + '</b><br/>' + - Highcharts.numberFormat(this.y, 2) + '<br/>(' + - Highcharts.numberFormat(this.percentage, 2) + ' %)'; - } - } - }); + queryPieChart = PMA_createProfilingChartJqplot( + 'serverstatusquerieschart', + cdata + ); initTableSorter(tab.attr('id')); break; @@ -610,7 +610,7 @@ function makeProfilingChart() // Prevent the user from seeing the JSON code $('div#profilingchart').html('').show(); - PMA_createProfilingChartJqplot(data); + PMA_createProfilingChartJqplot('profilingchart', data); } |