Code cleanup, mostly added extra spaces

This commit is contained in:
Herman van Rink
2010-08-26 17:01:12 +02:00
parent 0ea410c3e4
commit 51c9c1763e
9 changed files with 20 additions and 18 deletions

View File

@@ -54,7 +54,7 @@ function PMA_chart_profiling($data)
{ {
$chartData = array(); $chartData = array();
foreach($data as $dataValue) { foreach($data as $dataValue) {
$value = (int)($dataValue['Duration']*1000000); $value = (int)($dataValue['Duration'] * 1000000);
$key = ucwords($dataValue['Status']); $key = ucwords($dataValue['Status']);
$chartData[$key] = $value; $chartData[$key] = $value;
} }
@@ -247,10 +247,10 @@ function PMA_chart_results($data, &$chartSettings)
function PMA_handle_chart_err($errors) function PMA_handle_chart_err($errors)
{ {
if (in_array(ERR_NO_GD, $errors)) { if (in_array(ERR_NO_GD, $errors)) {
PMA_warnMissingExtension('GD', false, 'GD extension is needed for charts.'); PMA_warnMissingExtension('GD', false, __('GD extension is needed for charts.'));
} }
else if (in_array(ERR_NO_JSON, $errors)) { else if (in_array(ERR_NO_JSON, $errors)) {
PMA_warnMissingExtension('JSON', false, 'JSON encoder is needed for chart tooltips.'); PMA_warnMissingExtension('JSON', false, __('JSON encoder is needed for chart tooltips.'));
} }
} }

View File

@@ -31,7 +31,7 @@ class PMA_pChart_multi_bar extends PMA_pChart_multi
parent::drawChart(); parent::drawChart();
// Draw the bar chart // Draw the bar chart
$this->chart->drawBarGraph($this->dataSet->GetData(),$this->dataSet->GetDataDescription(),70); $this->chart->drawBarGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 70);
} }
} }

View File

@@ -31,8 +31,8 @@ class PMA_pChart_multi_line extends PMA_pChart_multi
parent::drawChart(); parent::drawChart();
// Draw the bar chart // Draw the bar chart
$this->chart->drawLineGraph($this->dataSet->GetData(),$this->dataSet->GetDataDescription()); $this->chart->drawLineGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription());
$this->chart->drawPlotGraph($this->dataSet->GetData(),$this->dataSet->GetDataDescription(),3,1,-1,-1,-1,TRUE); $this->chart->drawPlotGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 3, 1, -1, -1, -1, TRUE);
} }
} }

View File

@@ -91,8 +91,9 @@ class PMA_pChart_multi_radar extends PMA_pChart_multi
$borderOffset += 40; $borderOffset += 40;
// Draw the radar chart // Draw the radar chart
$this->chart->drawRadarAxis($this->dataSet->GetData(),$this->dataSet->GetDataDescription(),TRUE,$borderOffset,120,120,120,230,230,230,-1,2); $this->chart->drawRadarAxis($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), TRUE, $borderOffset,
$this->chart->drawFilledRadar($this->dataSet->GetData(),$this->dataSet->GetDataDescription(),50,$borderOffset); 120, 120, 120, 230, 230, 230, -1, 2);
$this->chart->drawFilledRadar($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 50, $borderOffset);
} }
} }

View File

@@ -31,8 +31,8 @@ class PMA_pChart_Pie extends PMA_pChart_multi
protected function prepareDataSet() protected function prepareDataSet()
{ {
// Dataset definition // Dataset definition
$this->dataSet->AddPoint(array_values($this->data),"Values"); $this->dataSet->AddPoint(array_values($this->data), "Values");
$this->dataSet->AddPoint(array_keys($this->data),"Keys"); $this->dataSet->AddPoint(array_keys($this->data), "Keys");
$this->dataSet->AddAllSeries(); $this->dataSet->AddAllSeries();
$this->dataSet->SetAbsciseLabelSerie("Keys"); $this->dataSet->SetAbsciseLabelSerie("Keys");
} }
@@ -75,7 +75,7 @@ class PMA_pChart_Pie extends PMA_pChart_multi
// lower part. This is why we set an offset to the // lower part. This is why we set an offset to the
// Y middle coordiantes. // Y middle coordiantes.
$middleY - 15, $middleY - 15,
120,PIE_PERCENTAGE,FALSE,60,30,10,1); 120, PIE_PERCENTAGE, FALSE, 60, 30, 10, 1);
} }
/** /**
@@ -88,7 +88,7 @@ class PMA_pChart_Pie extends PMA_pChart_multi
$this->getLabelHeight() + $this->getLegendMargin(TOP), $this->getLabelHeight() + $this->getLegendMargin(TOP),
$this->dataSet->GetData(), $this->dataSet->GetData(),
$this->dataSet->GetDataDescription(), $this->dataSet->GetDataDescription(),
250,250,250); 250, 250, 250);
} }
protected function getLegendBoxWidth() protected function getLegendBoxWidth()

View File

@@ -28,7 +28,7 @@ class PMA_pChart_single_bar extends PMA_pChart_single
{ {
// Draw the bar chart // Draw the bar chart
// use stacked bar graph function, because it gives bars with alpha // use stacked bar graph function, because it gives bars with alpha
$this->chart->drawStackedBarGraph($this->dataSet->GetData(),$this->dataSet->GetDataDescription(),70); $this->chart->drawStackedBarGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 70);
} }
} }

View File

@@ -27,8 +27,8 @@ class PMA_pChart_single_line extends PMA_pChart_single
protected function drawChart() protected function drawChart()
{ {
// Draw the line chart // Draw the line chart
$this->chart->drawLineGraph($this->dataSet->GetData(),$this->dataSet->GetDataDescription()); $this->chart->drawLineGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription());
$this->chart->drawPlotGraph($this->dataSet->GetData(),$this->dataSet->GetDataDescription(),3,1,-1,-1,-1,TRUE); $this->chart->drawPlotGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 3, 1, -1, -1, -1, TRUE);
} }
} }

View File

@@ -79,8 +79,9 @@ class PMA_pChart_single_radar extends PMA_pChart_single
// the least ammount that radar is away from the graph area side. // the least ammount that radar is away from the graph area side.
$borderOffset += 40; $borderOffset += 40;
$this->chart->drawRadarAxis($this->dataSet->GetData(),$this->dataSet->GetDataDescription(),TRUE,$borderOffset,120,120,120,230,230,230,-1,2); $this->chart->drawRadarAxis($this->dataSet->GetData(), $this->dataSet->GetDataDescription(),
$this->chart->drawFilledRadar($this->dataSet->GetData(),$this->dataSet->GetDataDescription(),50,$borderOffset); TRUE, $borderOffset, 120, 120, 120, 230, 230, 230, -1, 2);
$this->chart->drawFilledRadar($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 50, $borderOffset);
} }
} }

View File

@@ -29,7 +29,7 @@ class PMA_pChart_stacked_bar extends PMA_pChart_multi
parent::drawChart(); parent::drawChart();
// Draw the bar chart // Draw the bar chart
$this->chart->drawStackedBarGraph($this->dataSet->GetData(),$this->dataSet->GetDataDescription(),70); $this->chart->drawStackedBarGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 70);
} }
} }