summaryrefslogtreecommitdiffstats
path: root/src/charts
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineeringinc.com>2015-12-12 20:31:50 -0600
committerTimothy Pearson <tpearson@raptorengineeringinc.com>2015-12-12 20:31:50 -0600
commitac2c7e05d104d1dc39ccf5391b13103dab7d251f (patch)
tree10b1d87df4bc8989ab2a8a52d89b7c2c888b8ef6 /src/charts
parent825295b8ae3979aff902f485edf00e8e513fb067 (diff)
downloadzetacomponents-graph-ac2c7e05d104d1dc39ccf5391b13103dab7d251f.zip
zetacomponents-graph-ac2c7e05d104d1dc39ccf5391b13103dab7d251f.tar.gz
Add option to only render specific datasets with fill color as opposed to all datasets
Diffstat (limited to 'src/charts')
-rw-r--r--src/charts/line.php7
-rw-r--r--src/charts/radar.php7
2 files changed, 12 insertions, 2 deletions
diff --git a/src/charts/line.php b/src/charts/line.php
index 2225de6..0bfa7f7 100644
--- a/src/charts/line.php
+++ b/src/charts/line.php
@@ -276,7 +276,12 @@ class ezcGraphLineChart extends ezcGraphChart
$yAxis = ( $data->yAxis->default ? $data->yAxis->default: $this->elements['yAxis'] );
// Determine fill color for dataset
- if ( $this->options->fillLines !== false )
+ if ( $data->fillLine !== false )
+ {
+ $fillColor = clone $data->color->default;
+ $fillColor->alpha = (int) round( ( 255 - $fillColor->alpha ) * ( $data->fillLine / 255 ) );
+ }
+ else if ( $this->options->fillLines !== false )
{
$fillColor = clone $data->color->default;
$fillColor->alpha = (int) round( ( 255 - $fillColor->alpha ) * ( $this->options->fillLines / 255 ) );
diff --git a/src/charts/radar.php b/src/charts/radar.php
index 23bcc3a..b7bd820 100644
--- a/src/charts/radar.php
+++ b/src/charts/radar.php
@@ -300,7 +300,12 @@ class ezcGraphRadarChart extends ezcGraphChart
{
--$nr;
// Determine fill color for dataset
- if ( $this->options->fillLines !== false )
+ if ( $data->fillLine !== false )
+ {
+ $fillColor = clone $data->color->default;
+ $fillColor->alpha = (int) round( ( 255 - $fillColor->alpha ) * ( $data->fillLine / 255 ) );
+ }
+ else if ( $this->options->fillLines !== false )
{
$fillColor = clone $data->color->default;
$fillColor->alpha = (int) round( ( 255 - $fillColor->alpha ) * ( $this->options->fillLines / 255 ) );
OpenPOWER on IntegriCloud