diff options
author | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-19 01:44:07 +0400 |
---|---|---|
committer | Benaka Moorthi <benaka.moorthi@gmail.com> | 2013-09-19 01:45:06 +0400 |
commit | fa9502221744c1327221d5ff147807883d00075e (patch) | |
tree | 7b98d25f55770f1caf0c7087f84780b90cef6cea | |
parent | 4ebef2bb18a98b0c28d4f19cb93999f55d869a99 (diff) |
Quick fix so row evolution sparklines will have color in widgetize's iframes.
-rw-r--r-- | core/Visualization/Sparkline.php | 18 | ||||
m--------- | tests/PHPUnit/UI | 0 |
2 files changed, 13 insertions, 5 deletions
diff --git a/core/Visualization/Sparkline.php b/core/Visualization/Sparkline.php index 38679027dd..f946fa629e 100644 --- a/core/Visualization/Sparkline.php +++ b/core/Visualization/Sparkline.php @@ -158,11 +158,19 @@ class Sparkline implements ViewInterface private function setSparklineColors($sparkline) { $colors = Common::getRequestVar('colors', false, 'json'); - if (!empty($colors)) { - foreach (self::$colorNames as $name) { - if (!empty($colors[$name])) { - $sparkline->SetColorHtml($name, $colors[$name]); - } + if (empty($colors)) { // quick fix so row evolution sparklines will have color in widgetize's iframes + $colors = array( + 'backgroundColor' => '#ffffff', + 'lineColor' => '#162C4A', + 'minPointColor' => '#ff7f7f', + 'lastPointColor' => '#55AAFF', + 'maxPointColor' => '#75BF7C' + ); + } + + foreach (self::$colorNames as $name) { + if (!empty($colors[$name])) { + $sparkline->SetColorHtml($name, $colors[$name]); } } } diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI -Subproject 66266d6cbf9889d87427e8ec99ae0dc5aa57997 +Subproject 2a376b54e55c5955bc31adf2a2fb7eb58bd7ba5 |