diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-05-10 06:53:24 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-05-10 06:53:24 +0000 |
commit | 2b971feeaf028aa8025997ddb5616006bb0ad4d5 (patch) | |
tree | b68c53cf246427e5bb9bedad1797f7360426e25f /src/renderer | |
parent | 9769309977ce189b5ffc68a850c7e03b1928f8b1 (diff) | |
download | zetacomponents-graph-2b971feeaf028aa8025997ddb5616006bb0ad4d5.zip zetacomponents-graph-2b971feeaf028aa8025997ddb5616006bb0ad4d5.tar.gz |
- Fixed issue #10744: ExactAxisLabelRenderer shows last value at position of
second last value if showLastValue is disabled
# Test case for this follows in a later commit
Diffstat (limited to 'src/renderer')
-rw-r--r-- | src/renderer/axis_label_exact.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/renderer/axis_label_exact.php b/src/renderer/axis_label_exact.php index 43ef219..27ec112 100644 --- a/src/renderer/axis_label_exact.php +++ b/src/renderer/axis_label_exact.php @@ -171,10 +171,12 @@ class ezcGraphAxisExactLabelRenderer extends ezcGraphAxisLabelRenderer break; } + $showLabel = true; switch ( true ) { case ( !$this->showLastValue && $step->isLast ): // Skip last step if showLastValue is false + $showLabel = false; break; // Draw label at top left of step case ( ( $axis->position === ezcGraph::BOTTOM ) && @@ -221,11 +223,14 @@ class ezcGraphAxisExactLabelRenderer extends ezcGraphAxisLabelRenderer break; } - $renderer->drawText( - $labelBoundings, - $step->label, - $alignement - ); + if ( $showLabel ) + { + $renderer->drawText( + $labelBoundings, + $step->label, + $alignement + ); + } } if ( !$step->isLast ) |