diff options
author | Marc Delisle <marc@infomarc.info> | 2012-05-11 22:28:08 +0400 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2012-05-11 22:28:08 +0400 |
commit | a44ee5909345fe24adcbd498ecc9255e36f66d58 (patch) | |
tree | 227074cd0afbb0e34c9ad387570767c389f0a539 /js | |
parent | b8603f16b8da45be0256f966f3b763b80a273d5f (diff) |
jqPlot for profiling chart
Diffstat (limited to 'js')
-rw-r--r-- | js/functions.js | 23 | ||||
-rw-r--r-- | js/sql.js | 2 |
2 files changed, 23 insertions, 2 deletions
diff --git a/js/functions.js b/js/functions.js index 60ef801a65..b942bcd6f9 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1686,7 +1686,7 @@ function PMA_createChart(passedSettings) /* - * Creates a Profiling Chart. Used in sql.php and server_status.js + * Creates a Profiling Chart. Used in server_status.js */ function PMA_createProfilingChart(data, options) { @@ -1722,6 +1722,27 @@ function PMA_createProfilingChart(data, options) },options)); } +/* + * Creates a Profiling Chart with jqplot. Used in sql.js + */ +function PMA_createProfilingChartJqplot(data, options) +{ + return $.jqplot('profilingchart', [data], + { + seriesDefaults: { + renderer: $.jqplot.PieRenderer, + rendererOptions: { + showDataLabels: true + } + }, + legend: { + show: true, + location: 'e' + } + } + ); +} + /** * Formats a profiling duration nicely (in us and ms time). Used in PMA_createProfilingChart() and server_status.js * @@ -610,7 +610,7 @@ function makeProfilingChart() // Prevent the user from seeing the JSON code $('div#profilingchart').html('').show(); - PMA_createProfilingChart(data); + PMA_createProfilingChartJqplot(data); } |