Author: kn
Date: Mon Jan 21 13:17:39 2008
New Revision: 7208

Log:
- Implemented feature #12382: Enhance line chart to allow invisible lines.

Added:
    
trunk/Graph/tests/data/compare/ezcGraphLineChartTest_testLineChartNoLine.svg   
(with props)
Modified:
    trunk/Graph/ChangeLog
    trunk/Graph/src/options/line_chart.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 13:17:39 2008
@@ -2,6 +2,7 @@
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 - Implemented feature #11979: Line width configurable per data set.
+- Implemented feature #12382: Enhance line chart to allow invisible lines.
 
 
 1.2.1 - Monday 21 January 2008

Modified: trunk/Graph/src/options/line_chart.php
==============================================================================
--- trunk/Graph/src/options/line_chart.php [iso-8859-1] (original)
+++ trunk/Graph/src/options/line_chart.php [iso-8859-1] Mon Jan 21 13:17:39 2008
@@ -84,6 +84,14 @@
         switch ( $propertyName )
         {
             case 'lineThickness':
+                if ( !is_numeric( $propertyValue ) ||
+                     ( $propertyValue < 0 ) ) 
+                {
+                    throw new ezcBaseValueException( $propertyName, 
$propertyValue, 'int >= 0' );
+                }
+
+                $this->properties[$propertyName] = (int) $propertyValue;
+                break;
             case 'symbolSize':
             case 'highlightSize':
                 if ( !is_numeric( $propertyValue ) ||

Added: 
trunk/Graph/tests/data/compare/ezcGraphLineChartTest_testLineChartNoLine.svg
==============================================================================
Binary file - no diff available.

Propchange: 
trunk/Graph/tests/data/compare/ezcGraphLineChartTest_testLineChartNoLine.svg
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
trunk/Graph/tests/data/compare/ezcGraphLineChartTest_testLineChartNoLine.svg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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 13:17:39 2008
@@ -1018,6 +1018,31 @@
         );
     }
 
+    public function testLineChartNoLine()
+    {
+        $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+        $chart = new ezcGraphLineChart();
+        $chart->palette = new ezcGraphPaletteBlack();
+        $chart->data['sample'] = new ezcGraphArrayDataSet( array(
+            'Mozilla' => 4375,
+            'IE' => 345,
+            'Opera' => 1204,
+            'wget' => 231,
+            'Safari' => 987,
+        ) );
+
+        $chart->options->lineThickness = 0;
+
+        $chart->driver = new ezcGraphSvgDriver();
+        $chart->render( 500, 200, $filename );
+
+        $this->compare(
+            $filename,
+            $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . 
'.svg'
+        );
+    }
+
     public function testBarChartDataPointColors()
     {
         $filename = $this->tempDir . __FUNCTION__ . '.svg';


-- 
svn-components mailing list
[EMAIL PROTECTED]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to