summaryrefslogtreecommitdiffstats
path: root/tests/renderer_2d_test.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 /tests/renderer_2d_test.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 'tests/renderer_2d_test.php')
-rw-r--r--tests/renderer_2d_test.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/renderer_2d_test.php b/tests/renderer_2d_test.php
index 6e92989..6acc6e2 100644
--- a/tests/renderer_2d_test.php
+++ b/tests/renderer_2d_test.php
@@ -1859,6 +1859,36 @@ class ezcGraphRenderer2dTest extends ezcTestCase
$this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
);
}
+
+ public function testRenderLineChartWithHighlightedData()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $chart = new ezcGraphLineChart();
+ $chart->palette = new ezcGraphPaletteBlack();
+
+ $chart->data['Line 1'] = new ezcGraphArrayDataSet( array( 'sample 1' => 234, 'sample 2' => -21, 'sample 3' => 324, 'sample 4' => -120, 'sample 5' => 1) );
+ $chart->data['Line 2'] = new ezcGraphArrayDataSet( array( 'sample 1' => 543, 'sample 2' => 234, 'sample 3' => 298, 'sample 4' => 5, 'sample 5' => 613) );
+
+ $chart->data['Line 1']->highlight = true;
+ $chart->data['Line 2']->highlight['sample 5'] = true;
+
+ $chart->data['Line 1']->displayType = ezcGraph::BAR;
+
+ $chart->options->highlightSize = 12;
+ $chart->options->highlightFont->color = ezcGraphColor::fromHex( '#3465A4' );
+ $chart->options->highlightFont->background = ezcGraphColor::fromHex( '#D3D7CF' );
+ $chart->options->highlightFont->border = ezcGraphColor::fromHex( '#888A85' );
+
+ $chart->xAxis->axisLabelRenderer = new ezcGraphAxisBoxedLabelRenderer();
+
+ $chart->render( 500, 200, $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
+ );
+ }
}
?>
OpenPOWER on IntegriCloud