diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2008-12-04 16:03:47 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2008-12-04 16:03:47 +0000 |
commit | b0bd4a7169a375ff74266d5cb15e817b1484dc07 (patch) | |
tree | 4d6aed10aaec67892ce1f0137726ebef60b6722e /tests/line_test.php | |
parent | b322a8d3c8f26d9df21244319c3a2aa281795d07 (diff) | |
download | zetacomponents-graph-b0bd4a7169a375ff74266d5cb15e817b1484dc07.zip zetacomponents-graph-b0bd4a7169a375ff74266d5cb15e817b1484dc07.tar.gz |
- Implemented feature #014010: Possibility to set x/y offsets for
highlightValue (Patch by Markus Lervik)
Diffstat (limited to 'tests/line_test.php')
-rw-r--r-- | tests/line_test.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/line_test.php b/tests/line_test.php index 72ae0b8..2c1e029 100644 --- a/tests/line_test.php +++ b/tests/line_test.php @@ -882,6 +882,34 @@ class ezcGraphLineChartTest extends ezcGraphTestCase ); } + public function testLineChartHighlightValueOffset() + { + $filename = $this->tempDir . __FUNCTION__ . '.svg'; + + $chart = new ezcGraphLineChart(); + $chart->data['sample'] = new ezcGraphArrayDataSet( array( + 'Mozilla' => 4375, + 'IE' => 345, + 'Opera' => 1204, + 'wget' => 231, + 'Safari' => 987, + ) ); + + $chart->data['sample']->highlight = true; + $chart->data['sample']->highlightValue['Opera'] = 'Opera!'; + + $chart->options->highlightXOffset = 20; + $chart->options->highlightYOffset = -10; + + $chart->driver = new ezcGraphSvgDriver(); + $chart->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + public function testLineChartHighlightFontPadding() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; |