Author: kn Date: Mon Jan 21 12:19:50 2008 New Revision: 7202 Log: - Fixed issue #12405: Highlightfontsize reduced when padding > 0 in highlight font options
Modified: trunk/Graph/ChangeLog trunk/Graph/src/charts/line.php trunk/Graph/tests/line_test.php Modified: trunk/Graph/ChangeLog ============================================================================== --- trunk/Graph/ChangeLog [iso-8859-1] (original) +++ trunk/Graph/ChangeLog [iso-8859-1] Mon Jan 21 12:19:50 2008 @@ -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 Modified: trunk/Graph/src/charts/line.php ============================================================================== --- trunk/Graph/src/charts/line.php [iso-8859-1] (original) +++ trunk/Graph/src/charts/line.php [iso-8859-1] Mon Jan 21 12:19:50 2008 @@ -393,7 +393,7 @@ $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 ) ); } Modified: trunk/Graph/tests/line_test.php ============================================================================== --- trunk/Graph/tests/line_test.php [iso-8859-1] (original) +++ trunk/Graph/tests/line_test.php [iso-8859-1] Mon Jan 21 12:19:50 2008 @@ -882,6 +882,36 @@ ); } + 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'; -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components