Hi, I got a fix for issue #11190 [1] ready (patch attached), but I wonder if we should consider this a BC break.
The issue: Palettes define the colors used for data sets and single data points in pie charts. In pie charts for now the second color has been choosed for the first pie element - which obviously seems incorrect. The fix is quite easy, but will change the colors of all yet rendered pie elements in pie charts. Other chart types are not affected. Should this be considered as a bug (-1), or a feature (+1)? [1] http://issues.ez.no/11180 -- Mit freundlichen Grüßen / Med vennlig hilsen Kore Nordmann (GPG: 0xDDC70BBB) eZ Components Developer eZ systems Headquaters tel +49 (0) 231-9742-7750 | fax +49 (0) 231-9742-7751 [EMAIL PROTECTED] | eZ systems | ez.no
Index: Graph/src/interfaces/palette.php
===================================================================
--- Graph/src/interfaces/palette.php (revision 5774)
+++ Graph/src/interfaces/palette.php (working copy)
@@ -158,6 +158,17 @@
}
/**
+ * Manually reset the color counter to use the first color again
+ *
+ * @access public
+ */
+ public function resetColorCounter()
+ {
+ $this->colorIndex = -1;
+ $this->symbolIndex = -1;
+ }
+
+ /**
* Returns the requested property
*
* @param string $propertyName Name of property
Index: Graph/src/data_container/single.php
===================================================================
--- Graph/src/data_container/single.php (revision 5774)
+++ Graph/src/data_container/single.php (working copy)
@@ -37,6 +37,9 @@
{
parent::addDataSet( $name, $dataSet );
+ // Resette palette color counter
+ $this->chart->palette->resetColorCounter();
+
// Colorize each data element
foreach ( $this->data[$name] as $label => $value )
{
signature.asc
Description: This is a digitally signed message part
-- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
