From b65f6e84f239b5cf062b469a311fa8d8035a1087 Mon Sep 17 00:00:00 2001
From: alvaro <alvaro@graves.cl>
Date: Thu, 21 Mar 2013 09:10:32 -0700
Subject: [PATCH] change color functin in stacked bars

---
 .../lib/Haanga/Extension/Filter/D3stackedcolumnchart.php     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/Haanga/lib/Haanga/Extension/Filter/D3stackedcolumnchart.php b/lib/Haanga/lib/Haanga/Extension/Filter/D3stackedcolumnchart.php
index 5a5a3e82..67da8c2d 100644
--- a/lib/Haanga/lib/Haanga/Extension/Filter/D3stackedcolumnchart.php
+++ b/lib/Haanga/lib/Haanga/Extension/Filter/D3stackedcolumnchart.php
@@ -117,7 +117,10 @@ class Haanga_Extension_Filter_D3StackedColumnChart{
 
     var options_$divId = ".json_encode($options)."; 
     var dataset_$divId = ".json_encode($data).";
-    var color = d3.scale.category10();
+    var color = function(d){
+      s = ['steelblue', 'brown', 'gold', 'ForestGreen'];
+      return s[d%s.length];
+    };
     
     var maxValue_$divId = getMax(dataset_$divId);
     options_$divId.numberOfBars = getNumberOfBars(dataset_$divId);
-- 
GitLab