diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-09-19 13:29:02 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-09-19 13:29:02 +0000 |
commit | fe13be6dac3b9a019cd4ee7a4e1b3272ef922871 (patch) | |
tree | 3ac7e934fb907911583e4bd4c48aec7dc12bde95 /src/charts/line.php | |
parent | 27cffe45cdf9cc6d36751bcc998459ae9d8a1f4b (diff) | |
download | zetacomponents-graph-fe13be6dac3b9a019cd4ee7a4e1b3272ef922871.zip zetacomponents-graph-fe13be6dac3b9a019cd4ee7a4e1b3272ef922871.tar.gz |
- Added background and border to font configuration
- Show value for highlighted datapoints in bar and line charts
Diffstat (limited to 'src/charts/line.php')
-rw-r--r-- | src/charts/line.php | 35 |
1 files changed, 34 insertions, 1 deletions
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: |