summaryrefslogtreecommitdiffstats
path: root/src/datasets/base.php
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineeringinc.com>2015-12-12 20:31:50 -0600
committerTimothy Pearson <tpearson@raptorengineeringinc.com>2016-01-11 02:09:02 -0600
commit63fc2a61d44e2ea95ebab72f88ca44a6416d6979 (patch)
tree3c7614c61c9e1aa8312ce50578506ecd28c02151 /src/datasets/base.php
parent551ab952471befef109c76177ebc0ffa76dbed5e (diff)
downloadzetacomponents-graph-fill-color-separation.zip
zetacomponents-graph-fill-color-separation.tar.gz
Add option to only render specific datasets with fill color as opposed to all datasetsfill-color-separation
Diffstat (limited to 'src/datasets/base.php')
-rw-r--r--src/datasets/base.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/datasets/base.php b/src/datasets/base.php
index 5271ead..219b3f9 100644
--- a/src/datasets/base.php
+++ b/src/datasets/base.php
@@ -37,6 +37,9 @@
* Displayed string if a data point is highlighted
* @property bool $highlight
* Status if datapoint element is hilighted
+ * @property mixed $fillLine
+ * Interpretation depends on underlying chart type
+ * @see chart type fillLines option for details
* @property int $displayType
* Display type of chart data
* @property string $url
@@ -110,6 +113,7 @@ abstract class ezcGraphDataSet implements ArrayAccess, Iterator, Countable
$this->properties['yAxis'] = new ezcGraphDataSetAxisProperty( $this );
$this->properties['highlight']->default = false;
+ $this->properties['fillLine'] = false;
}
/**
@@ -149,6 +153,21 @@ abstract class ezcGraphDataSet implements ArrayAccess, Iterator, Countable
$this->symbol->default = $this->palette->dataSetSymbol;
break;
+ case 'fillLine':
+ if ( ( $propertyValue !== false ) &&
+ !is_numeric( $propertyValue ) ||
+ ( $propertyValue < 0 ) ||
+ ( $propertyValue > 255 ) )
+ {
+ throw new ezcBaseValueException( $propertyName, $propertyValue, 'false OR 0 <= int <= 255' );
+ }
+
+ $this->properties[$propertyName] = (
+ $propertyValue === false
+ ? false
+ : (int) $propertyValue );
+ break;
+
default:
throw new ezcBasePropertyNotFoundException( $propertyName );
break;
OpenPOWER on IntegriCloud