diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2009-05-28 14:33:36 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2009-05-28 14:33:36 +0000 |
commit | eb36eb0b72d1e0b01b46f4570c2f6e77ba723e63 (patch) | |
tree | 4cf08c70237495df7c39cd2a828515e2c59895d1 /src/charts | |
parent | b24c848560db8723e04cffe2d04c0a6f7089181e (diff) | |
download | zetacomponents-graph-eb36eb0b72d1e0b01b46f4570c2f6e77ba723e63.zip zetacomponents-graph-eb36eb0b72d1e0b01b46f4570c2f6e77ba723e63.tar.gz |
- Fixed #14857: Highlight text misplaced in charts with multiple bar data
sets.
Diffstat (limited to 'src/charts')
-rw-r--r-- | src/charts/line.php | 82 |
1 files changed, 63 insertions, 19 deletions
diff --git a/src/charts/line.php b/src/charts/line.php index 08d8650..3348920 100644 --- a/src/charts/line.php +++ b/src/charts/line.php @@ -302,6 +302,27 @@ class ezcGraphLineChart extends ezcGraphChart $yAxisNullPosition, ( $data->lineThickness->default ? $data->lineThickness->default : $this->options->lineThickness ) ); + + // Render highlight string if requested + if ( $data->highlight[$key] ) + { + $renderer->drawDataHighlightText( + $boundings, + new ezcGraphContext( $datasetName, $key, $data->url[$key] ), + $point, + $yAxisNullPosition, + $nr[$data->displayType->default], + $count[$data->displayType->default], + $this->options->highlightFont, + ( $data->highlightValue[$key] ? $data->highlightValue[$key] : $value ), + $this->options->highlightSize + $this->options->highlightFont->padding * 2, + ( $this->options->highlightLines ? $data->color[$key] : null ), + ( $this->options->highlightXOffset ? $this->options->highlightXOffset : 0 ), + ( $this->options->highlightYOffset ? $this->options->highlightYOffset : 0 ), + 0., + ezcGraph::LINE + ); + } break; case ( $data->displayType->default === ezcGraph::BAR ) && $this->options->stackBars : @@ -356,6 +377,27 @@ class ezcGraphLineChart extends ezcGraphChart $stackedSymbol[(int) ( $point->x * 10000 )], $yAxisNullPosition ); + + // Render highlight string if requested + if ( $data->highlight[$key] ) + { + $renderer->drawDataHighlightText( + $boundings, + new ezcGraphContext( $datasetName, $key, $data->url[$key] ), + $point, + $yAxisNullPosition, + $nr[$data->displayType->default], + $count[$data->displayType->default], + $this->options->highlightFont, + ( $data->highlightValue[$key] ? $data->highlightValue[$key] : $value ), + $this->options->highlightSize + $this->options->highlightFont->padding * 2, + ( $this->options->highlightLines ? $data->color[$key] : null ), + ( $this->options->highlightXOffset ? $this->options->highlightXOffset : 0 ), + ( $this->options->highlightYOffset ? $this->options->highlightYOffset : 0 ), + 0., + ezcGraph::LINE + ); + } break; case $data->displayType->default === ezcGraph::BAR: $renderer->drawBar( @@ -369,30 +411,32 @@ class ezcGraphLineChart extends ezcGraphChart $data->symbol[$key], $yAxisNullPosition ); + + // Render highlight string if requested + if ( $data->highlight[$key] ) + { + $renderer->drawDataHighlightText( + $boundings, + new ezcGraphContext( $datasetName, $key, $data->url[$key] ), + $point, + $yAxisNullPosition, + $nr[$data->displayType->default], + $count[$data->displayType->default], + $this->options->highlightFont, + ( $data->highlightValue[$key] ? $data->highlightValue[$key] : $value ), + $this->options->highlightSize + $this->options->highlightFont->padding * 2, + ( $this->options->highlightLines ? $data->color[$key] : null ), + ( $this->options->highlightXOffset ? $this->options->highlightXOffset : 0 ), + ( $this->options->highlightYOffset ? $this->options->highlightYOffset : 0 ), + $width, + $data->displayType->default + ); + } break; default: throw new ezcGraphInvalidDisplayTypeException( $data->displayType->default ); break; } - - // Render highlight string if requested - if ( $data->highlight[$key] ) - { - $renderer->drawDataHighlightText( - $boundings, - new ezcGraphContext( $datasetName, $key, $data->url[$key] ), - $point, - $yAxisNullPosition, - $nr[$data->displayType->default], - $count[$data->displayType->default], - $this->options->highlightFont, - ( $data->highlightValue[$key] ? $data->highlightValue[$key] : $value ), - $this->options->highlightSize + $this->options->highlightFont->padding * 2, - ( $this->options->highlightLines ? $data->color[$key] : null ), - ( $this->options->highlightXOffset ? $this->options->highlightXOffset : 0 ), - ( $this->options->highlightYOffset ? $this->options->highlightYOffset : 0 ) - ); - } // Store last point, used to connect lines in line chart. $lastPoint = $point; |