Author: kn
Date: Mon Jan 21 13:14:23 2008
New Revision: 7207

Log:
- Implemented feature #11979: Line width configurable per data set.

Added:
    
trunk/Graph/tests/data/compare/ezcGraphLineChartTest_testLineChartThickLinesPerDataSet.svg
   (with props)
Modified:
    trunk/Graph/ChangeLog
    trunk/Graph/src/charts/line.php
    trunk/Graph/src/datasets/base.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:14:23 2008
@@ -1,3 +1,9 @@
+1.3-alpha1 - [RELEASEDATE]
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Implemented feature #11979: Line width configurable per data set.
+
+
 1.2.1 - Monday 21 January 2008
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

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 13:14:23 2008
@@ -307,7 +307,7 @@
                             $data->color[$key],
                             $fillColor,
                             $yAxisNullPosition,
-                            $this->options->lineThickness
+                            ( $data->lineThickness->default ? 
$data->lineThickness->default : $this->options->lineThickness )
                         );
                         break;
                     case ( $data->displayType->default === ezcGraph::BAR ) &&

Modified: trunk/Graph/src/datasets/base.php
==============================================================================
--- trunk/Graph/src/datasets/base.php [iso-8859-1] (original)
+++ trunk/Graph/src/datasets/base.php [iso-8859-1] Mon Jan 21 13:14:23 2008
@@ -75,6 +75,7 @@
         $this->properties['label'] = new ezcGraphDataSetStringProperty( $this 
);
         $this->properties['color'] = new ezcGraphDataSetColorProperty( $this );
         $this->properties['symbol'] = new ezcGraphDataSetIntProperty( $this );
+        $this->properties['lineThickness'] = new ezcGraphDataSetIntProperty( 
$this );
         $this->properties['highlight'] = new ezcGraphDataSetBooleanProperty( 
$this );
         $this->properties['highlightValue'] = new 
ezcGraphDataSetStringProperty( $this );
         $this->properties['displayType'] = new ezcGraphDataSetIntProperty( 
$this );
@@ -108,6 +109,7 @@
             case 'url':
             case 'color':
             case 'symbol':
+            case 'lineThickness':
             case 'highlight':
             case 'highlightValue':
             case 'displayType':

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

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

Propchange: 
trunk/Graph/tests/data/compare/ezcGraphLineChartTest_testLineChartThickLinesPerDataSet.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:14:23 2008
@@ -935,7 +935,7 @@
         );
     }
 
-    public function testLineChartThickLines3d()
+    public function testLineChartThickLinesPerDataSet()
     {
         $filename = $this->tempDir . __FUNCTION__ . '.svg';
 
@@ -948,6 +948,38 @@
             'wget' => 231,
             'Safari' => 987,
         ) );
+        $chart->data['sample 2'] = new ezcGraphArrayDataSet( array(
+            'Mozilla' => 2375,
+            'IE' => 145,
+            'Opera' => 804,
+            'wget' => 131,
+            'Safari' => 1287,
+        ) );
+
+        $chart->data['sample']->lineThickness = 2;
+
+        $chart->driver = new ezcGraphSvgDriver();
+        $chart->render( 500, 200, $filename );
+
+        $this->compare(
+            $filename,
+            $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . 
'.svg'
+        );
+    }
+
+    public function testLineChartThickLines3d()
+    {
+        $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+        $chart = new ezcGraphLineChart();
+        $chart->options->lineThickness = 4;
+        $chart->data['sample'] = new ezcGraphArrayDataSet( array(
+            'Mozilla' => 4375,
+            'IE' => 345,
+            'Opera' => 1204,
+            'wget' => 231,
+            'Safari' => 987,
+        ) );
 
         $chart->driver = new ezcGraphSvgDriver();
         $chart->renderer = new ezcGraphRenderer3d();


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

Reply via email to