Author: Kore Nordmann
Date: 2006-06-27 10:18:55 +0200 (Tue, 27 Jun 2006)
New Revision: 3154
Log:
- Made symbol size in line charts customizeable
Modified:
trunk/Graph/src/charts/line.php
trunk/Graph/src/options/line_chart.php
Modified: trunk/Graph/src/charts/line.php
===================================================================
--- trunk/Graph/src/charts/line.php 2006-06-26 14:36:14 UTC (rev 3153)
+++ trunk/Graph/src/charts/line.php 2006-06-27 08:18:55 UTC (rev 3154)
@@ -71,6 +71,8 @@
protected function renderData( $renderer, $boundings )
{
+ $symbolSize = $this->options->symbolSize;
+
foreach ( $this->data as $data )
{
if ( $this->options->fillLines !== false )
@@ -169,8 +171,7 @@
// Draw Symbol
$symbol = $data->symbol[$key];
- // @TODO: Make config option
- $symbolSize = 8;
+
$symbolPosition = new ezcGraphCoordinate(
$point->x - $symbolSize / 2,
$point->y - $symbolSize / 2
Modified: trunk/Graph/src/options/line_chart.php
===================================================================
--- trunk/Graph/src/options/line_chart.php 2006-06-26 14:36:14 UTC (rev
3153)
+++ trunk/Graph/src/options/line_chart.php 2006-06-27 08:18:55 UTC (rev
3154)
@@ -32,6 +32,13 @@
protected $fillLines = false;
/**
+ * Size of symbols in line chart
+ *
+ * @var integer
+ */
+ protected $symbolSize = 8;
+
+ /**
* Set an option value
*
* @param string $propertyName
@@ -57,6 +64,9 @@
$this->fillLines = min( 255, max( 0, (int) $propertyValue
) );
}
break;
+ case 'symbolSize':
+ $this->symbolSize = max( 1, (int) $propertyValue );
+ break;
default:
return parent::__set( $propertyName, $propertyValue );
}
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components