Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorMarc Delisle <marc@infomarc.info>2012-05-11 22:28:08 +0400
committerMarc Delisle <marc@infomarc.info>2012-05-11 22:28:08 +0400
commita44ee5909345fe24adcbd498ecc9255e36f66d58 (patch)
tree227074cd0afbb0e34c9ad387570767c389f0a539 /js
parentb8603f16b8da45be0256f966f3b763b80a273d5f (diff)
jqPlot for profiling chart
Diffstat (limited to 'js')
-rw-r--r--js/functions.js23
-rw-r--r--js/sql.js2
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
*
diff --git a/js/sql.js b/js/sql.js
index 1323ef6b8a..57c28e5926 100644
--- a/js/sql.js
+++ b/js/sql.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);
}