From 59192857ba65c14388bbe5b1633a4f1ac346e9d1 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Wed, 5 Sep 2007 08:24:42 +0000 Subject: - Implemented feature #11247: Custom highlight values in line and bar charts. Thanks to Elger Thiele for the basic patch. --- src/charts/line.php | 4 ++-- src/datasets/base.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/charts/line.php b/src/charts/line.php index 3c5e0f8..6391704 100644 --- a/src/charts/line.php +++ b/src/charts/line.php @@ -277,7 +277,7 @@ class ezcGraphLineChart extends ezcGraphChart $nr[$data->displayType->default], $count[$data->displayType->default], $this->options->highlightFont, - $value, + ( $data->highlightValue[$key] ? $data->highlightValue[$key] : $value ), $this->options->highlightSize, ( $this->options->highlightLines ? $data->color[$key] : null ) ); @@ -356,7 +356,7 @@ class ezcGraphLineChart extends ezcGraphChart $nr[$data->displayType->default], $count[$data->displayType->default], $this->options->highlightFont, - $value, + ( $data->highlightValue[$key] ? $data->highlightValue[$key] : $value ), $this->options->highlightSize, ( $this->options->highlightLines ? $data->color[$key] : null ) ); diff --git a/src/datasets/base.php b/src/datasets/base.php index 37337f5..d3c205d 100644 --- a/src/datasets/base.php +++ b/src/datasets/base.php @@ -76,6 +76,7 @@ abstract class ezcGraphDataSet implements ArrayAccess, Iterator, Countable $this->properties['color'] = new ezcGraphDataSetColorProperty( $this ); $this->properties['symbol'] = new ezcGraphDataSetIntProperty( $this ); $this->properties['highlight'] = new ezcGraphDataSetBooleanProperty( $this ); + $this->properties['highlightValue'] = new ezcGraphDataSetStringProperty( $this ); $this->properties['displayType'] = new ezcGraphDataSetIntProperty( $this ); $this->properties['url'] = new ezcGraphDataSetStringProperty( $this ); @@ -108,6 +109,7 @@ abstract class ezcGraphDataSet implements ArrayAccess, Iterator, Countable case 'color': case 'symbol': case 'highlight': + case 'highlightValue': case 'displayType': case 'xAxis': case 'yAxis': -- cgit v1.1