Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenaka Moorthi <benaka.moorthi@gmail.com>2013-09-19 01:44:07 +0400
committerBenaka Moorthi <benaka.moorthi@gmail.com>2013-09-19 01:45:06 +0400
commitfa9502221744c1327221d5ff147807883d00075e (patch)
tree7b98d25f55770f1caf0c7087f84780b90cef6cea
parent4ebef2bb18a98b0c28d4f19cb93999f55d869a99 (diff)
Quick fix so row evolution sparklines will have color in widgetize's iframes.
-rw-r--r--core/Visualization/Sparkline.php18
m---------tests/PHPUnit/UI0
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