diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2008-01-21 11:19:50 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2008-01-21 11:19:50 +0000 |
commit | 9b65a96a8964326c376bdaf08d2829b75fa7d9be (patch) | |
tree | 15fe9780be064f80101798cf42461acfcd8b9707 | |
parent | b0af41a651740b07e0aa28a8c5c4c040fb3838c9 (diff) | |
download | zetacomponents-graph-9b65a96a8964326c376bdaf08d2829b75fa7d9be.zip zetacomponents-graph-9b65a96a8964326c376bdaf08d2829b75fa7d9be.tar.gz |
- Fixed issue #12405: Highlightfontsize reduced when padding > 0 in highlight
font options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/charts/line.php | 2 | ||||
-rw-r--r-- | tests/line_test.php | 30 |
3 files changed, 33 insertions, 1 deletions
@@ -7,6 +7,8 @@ not divisible by major step - Fixed issue #11777: Optionally independent axis font configuration - Fixed issue #12326: Per datapoint colors not used with bar charts +- Fixed issue #12405: Highlightfontsize reduced when padding > 0 in highlight + font options 1.2 - Monday 17 December 2007 diff --git a/src/charts/line.php b/src/charts/line.php index 30c1814..e358dfd 100644 --- a/src/charts/line.php +++ b/src/charts/line.php @@ -393,7 +393,7 @@ class ezcGraphLineChart extends ezcGraphChart $count[$data->displayType->default], $this->options->highlightFont, ( $data->highlightValue[$key] ? $data->highlightValue[$key] : $value ), - $this->options->highlightSize, + $this->options->highlightSize + $this->options->highlightFont->padding * 2, ( $this->options->highlightLines ? $data->color[$key] : null ) ); } diff --git a/tests/line_test.php b/tests/line_test.php index f502f77..bc15d9f 100644 --- a/tests/line_test.php +++ b/tests/line_test.php @@ -882,6 +882,36 @@ class ezcGraphLineChartTest extends ezcGraphTestCase ); } + public function testLineChartHighlightFontPadding() + { + $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->highlightFont->background = '#EEEEEC88'; + $chart->options->highlightFont->border = '#000000'; + $chart->options->highlightFont->borderWidth = 1; + $chart->options->highlightFont->padding = 2; + + $chart->driver = new ezcGraphSvgDriver(); + $chart->render( 500, 200, $filename ); + + $this->compare( + $filename, + $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg' + ); + } + public function testLineChartThickLines2d() { $filename = $this->tempDir . __FUNCTION__ . '.svg'; |