From 323edff5f22cb8d116d0eb58083f9733e1f53126 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Sat, 21 Dec 2013 11:21:27 +0100 Subject: Revert "Use non-local dependent formatting options everywhere" This reverts commit 5273fe7e6d19a4bdad3d987540171ff3a55fe053. --- src/options/pie_chart.php | 6 +++--- src/options/renderer_2d.php | 2 +- src/options/renderer_3d.php | 2 +- src/renderer/2d.php | 2 +- src/renderer/3d.php | 2 +- tests/logarithmical_axis_test.php | 4 ++-- tests/pie_test.php | 2 +- tests/renderer_3d_test.php | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/options/pie_chart.php b/src/options/pie_chart.php index c255313..e8a6b8d 100644 --- a/src/options/pie_chart.php +++ b/src/options/pie_chart.php @@ -40,7 +40,7 @@ * $graph->title = 'Access statistics'; * $graph->legend = false; * - * $graph->options->label = '%1$s (%3$.1F)'; + * $graph->options->label = '%1$s (%3$.1f)'; * $graph->options->percentThreshold = .05; * * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array( @@ -59,7 +59,7 @@ * String used to label pies * %1$s Name of pie * %2$d Value of pie - * %3$.1F Percentage + * %3$.1f Percentage * @property callback $labelCallback * Callback function to format pie chart labels. * Function will receive 3 parameters: @@ -89,7 +89,7 @@ class ezcGraphPieChartOptions extends ezcGraphChartOptions */ public function __construct( array $options = array() ) { - $this->properties['label'] = '%1$s: %2$d (%3$.1F%%)'; + $this->properties['label'] = '%1$s: %2$d (%3$.1f%%)'; $this->properties['labelCallback'] = null; $this->properties['sum'] = false; diff --git a/src/options/renderer_2d.php b/src/options/renderer_2d.php index 47eef5d..7008a0a 100644 --- a/src/options/renderer_2d.php +++ b/src/options/renderer_2d.php @@ -30,7 +30,7 @@ * $graph = new ezcGraphPieChart(); * $graph->palette = new ezcGraphPaletteBlack(); * $graph->title = 'Access statistics'; - * $graph->options->label = '%2$d (%3$.1F%%)'; + * $graph->options->label = '%2$d (%3$.1f%%)'; * * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array( * 'Mozilla' => 19113, diff --git a/src/options/renderer_3d.php b/src/options/renderer_3d.php index 36b3e44..8b0337b 100644 --- a/src/options/renderer_3d.php +++ b/src/options/renderer_3d.php @@ -34,7 +34,7 @@ * $graph = new ezcGraphPieChart(); * $graph->palette = new ezcGraphPaletteEzRed(); * $graph->title = 'Access statistics'; - * $graph->options->label = '%2$d (%3$.1F%%)'; + * $graph->options->label = '%2$d (%3$.1f%%)'; * * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array( * 'Mozilla' => 19113, diff --git a/src/renderer/2d.php b/src/renderer/2d.php index 81cbf7a..9793e0a 100644 --- a/src/renderer/2d.php +++ b/src/renderer/2d.php @@ -34,7 +34,7 @@ * $graph = new ezcGraphPieChart(); * $graph->palette = new ezcGraphPaletteBlack(); * $graph->title = 'Access statistics'; - * $graph->options->label = '%2$d (%3$.1F%%)'; + * $graph->options->label = '%2$d (%3$.1f%%)'; * * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array( * 'Mozilla' => 19113, diff --git a/src/renderer/3d.php b/src/renderer/3d.php index 4a21f85..9d43c17 100644 --- a/src/renderer/3d.php +++ b/src/renderer/3d.php @@ -34,7 +34,7 @@ * $graph = new ezcGraphPieChart(); * $graph->palette = new ezcGraphPaletteEzRed(); * $graph->title = 'Access statistics'; - * $graph->options->label = '%2$d (%3$.1F%%)'; + * $graph->options->label = '%2$d (%3$.1f%%)'; * * $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array( * 'Mozilla' => 19113, diff --git a/tests/logarithmical_axis_test.php b/tests/logarithmical_axis_test.php index 08dfcd0..ed2c594 100644 --- a/tests/logarithmical_axis_test.php +++ b/tests/logarithmical_axis_test.php @@ -156,9 +156,9 @@ class ezcGraphLogarithmicalAxisTest extends ezcGraphTestCase 'Wrong default value for property logarithmicalFormatString in class ezcGraphChartElementLogarithmicalAxis' ); - $options->logarithmicalFormatString = '%2$.2F^%1$d'; + $options->logarithmicalFormatString = '%2$.2f^%1$d'; $this->assertSame( - '%2$.2F^%1$d', + '%2$.2f^%1$d', $options->logarithmicalFormatString, 'Setting property value did not work for property logarithmicalFormatString in class ezcGraphChartElementLogarithmicalAxis' ); diff --git a/tests/pie_test.php b/tests/pie_test.php index 2652d03..a6731d9 100644 --- a/tests/pie_test.php +++ b/tests/pie_test.php @@ -68,7 +68,7 @@ class ezcGraphPieChartTest extends ezcGraphTestCase $options = new ezcGraphPieChartOptions(); $this->assertSame( - '%1$s: %2$d (%3$.1F%%)', + '%1$s: %2$d (%3$.1f%%)', $options->label, 'Wrong default value for property label in class ezcGraphPieChartOptions' ); diff --git a/tests/renderer_3d_test.php b/tests/renderer_3d_test.php index 3d17194..1548247 100644 --- a/tests/renderer_3d_test.php +++ b/tests/renderer_3d_test.php @@ -445,7 +445,7 @@ class ezcGraphRenderer3dTest extends ezcGraphTestCase 'Used' => 28, ) ); - $graph->options->label = '%1$s (%3$.1F%%)'; + $graph->options->label = '%1$s (%3$.1f%%)'; // Configure renderer options $graph->renderer = new ezcGraphRenderer3d(); -- cgit v1.1