diff --git a/libchart/classes/view/chart/PieChart.php b/libchart/classes/view/chart/PieChart.php index f2e5119..0ee8144 100644 --- a/libchart/classes/view/chart/PieChart.php +++ b/libchart/classes/view/chart/PieChart.php @@ -64,9 +64,15 @@ protected function computeLayout() { * @return integer result of the comparison */ protected function sortPie($v1, $v2) { - return $v1[0] == $v2[0] ? 0 : - $v1[0] > $v2[0] ? -1 : - 1; + if ($v1[0] == $v2[0]) { + return 0; + } + + if ($v1[0] > $v2[0]) { + return -1; + } + + return 1; } /** @@ -264,4 +270,4 @@ public function render($fileName = null) { $this->plot->render($fileName); } } -?> \ No newline at end of file +?>