summaryrefslogtreecommitdiffstats
path: root/src/charts/line.php
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-09-19 13:29:02 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-09-19 13:29:02 +0000
commitfe13be6dac3b9a019cd4ee7a4e1b3272ef922871 (patch)
tree3ac7e934fb907911583e4bd4c48aec7dc12bde95 /src/charts/line.php
parent27cffe45cdf9cc6d36751bcc998459ae9d8a1f4b (diff)
downloadzetacomponents-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.php35
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:
OpenPOWER on IntegriCloud