From fe13be6dac3b9a019cd4ee7a4e1b3272ef922871 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Tue, 19 Sep 2006 13:29:02 +0000 Subject: - Added background and border to font configuration - Show value for highlighted datapoints in bar and line charts --- src/charts/line.php | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'src/charts') diff --git a/src/charts/line.php b/src/charts/line.php index 6d6f381..9732205 100644 --- a/src/charts/line.php +++ b/src/charts/line.php @@ -25,6 +25,7 @@ class ezcGraphLineChart extends ezcGraphChart public function __construct( array $options = array() ) { $this->options = new ezcGraphLineChartOptions( $options ); + $this->options->highlightFont = $this->options->font; parent::__construct(); @@ -152,6 +153,22 @@ class ezcGraphLineChart extends ezcGraphChart $yAxisNullPosition ); + if ( $data->highlight[$key] ) + { + $renderer->drawDataHighlightText( + $boundings, + new ezcGraphContext( $datasetName, $key ), + $point, + $yAxisNullPosition, + $nr[$data->displayType->default], + $count[$data->displayType->default], + $this->options->highlightFont, + $value, + $this->options->highlightSize, + ( $this->options->highlightLines ? $data->color[$key] : null ) + ); + } + $lastPoint = $point; } break; @@ -176,7 +193,7 @@ class ezcGraphLineChart extends ezcGraphChart $boundings, new ezcGraphContext( $datasetName, $key ), $data->color->default, - $this->elements['xAxis']->axisLabelRenderer->modifyChartDataPosition( + $point = $this->elements['xAxis']->axisLabelRenderer->modifyChartDataPosition( $this->elements['yAxis']->axisLabelRenderer->modifyChartDataPosition( $point ) @@ -187,6 +204,22 @@ class ezcGraphLineChart extends ezcGraphChart $data->symbol[$key], $yAxisNullPosition ); + + if ( $data->highlight[$key] ) + { + $renderer->drawDataHighlightText( + $boundings, + new ezcGraphContext( $datasetName, $key ), + $point, + $yAxisNullPosition, + $nr[$data->displayType->default], + $count[$data->displayType->default], + $this->options->highlightFont, + $value, + $this->options->highlightSize, + ( $this->options->highlightLines ? $data->color[$key] : null ) + ); + } } break; default: -- cgit v1.1