diff --git a/js/sql.js b/js/sql.js
index 444a813149..f58a172db2 100644
--- a/js/sql.js
+++ b/js/sql.js
@@ -1161,42 +1161,43 @@ $(document).ready(function() {
* Profiling Chart
*/
$(document).ready(function() {
- if($('#profilingchart').length==0) return;
-
- var cdata = new Array();
-
- $.each(jQuery.parseJSON($('#profilingchart').html()),function(key,value) {
- cdata.push([key,parseFloat(value)]);
- });
+ if($('#profilingchart').length==0) return;
+
+ var cdata = new Array();
+ var i=1;
+ $.each(jQuery.parseJSON($('#profilingchart').html()),function(key,value) {
+ cdata.push([key,parseFloat(value)]);
+ i++;
+ });
- PMA_createChart({
- chart: {
- renderTo: 'profilingchart',
- backgroundColor: $('#sqlqueryresults fieldset').css('background-color')
- },
- title: { text:'', margin:0 },
- series: [{
- type:'pie',
- name: 'Query execution time',
- data: cdata
- }],
- plotOptions: {
- pie: {
- allowPointSelect: true,
- cursor: 'pointer',
- dataLabels: {
- enabled: true,
- distance: 35,
- formatter: function() {
- return ''+ this.point.name +'
'+ Highcharts.numberFormat(this.percentage, 2) +' %';
- }
- }
- }
- },
- tooltip: {
- formatter: function() { return ''+ this.point.name +'
'+this.y+'s
('+Highcharts.numberFormat(this.percentage, 2) +' %)'; }
- }
- });
+ PMA_createChart({
+ chart: {
+ renderTo: 'profilingchart',
+ backgroundColor: $('#sqlqueryresults fieldset').css('background-color')
+ },
+ title: { text:'', margin:0 },
+ series: [{
+ type:'pie',
+ name: 'Query execution time',
+ data: cdata
+ }],
+ plotOptions: {
+ pie: {
+ allowPointSelect: true,
+ cursor: 'pointer',
+ dataLabels: {
+ enabled: true,
+ distance: 35,
+ formatter: function() {
+ return ''+ this.point.name +'
'+ Highcharts.numberFormat(this.percentage, 2) +' %';
+ }
+ }
+ }
+ },
+ tooltip: {
+ formatter: function() { return ''+ this.point.name +'
'+this.y+'s
('+Highcharts.numberFormat(this.percentage, 2) +' %)'; }
+ }
+ });
});
/**#@- */
diff --git a/sql.php b/sql.php
index 9d01a7b822..1d7933c6b1 100644
--- a/sql.php
+++ b/sql.php
@@ -17,11 +17,11 @@ require_once './libraries/bookmark.lib.php';
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
if(isset($_SESSION['profiling'])) {
- $GLOBALS['js_include'][] = 'highcharts/highcharts.js';
- /* Files required for chart exporting */
- $GLOBALS['js_include'][] = 'highcharts/exporting.js';
- $GLOBALS['js_include'][] = 'canvg/canvg.js';
- $GLOBALS['js_include'][] = 'canvg/rgbcolor.js';
+ $GLOBALS['js_include'][] = 'highcharts/highcharts.js';
+ /* Files required for chart exporting */
+ $GLOBALS['js_include'][] = 'highcharts/exporting.js';
+ $GLOBALS['js_include'][] = 'canvg/canvg.js';
+ $GLOBALS['js_include'][] = 'canvg/rgbcolor.js';
}
/**
@@ -897,30 +897,30 @@ else {
}
if (isset($profiling_results)) {
- echo '