cms/app-client/app/components/visu-chrono-year.js
changeset 424 feb0d3e0fef9
parent 394 48458e099b05
child 532 1190ea937f2d
--- a/cms/app-client/app/components/visu-chrono-year.js	Mon Nov 14 17:23:43 2016 +0100
+++ b/cms/app-client/app/components/visu-chrono-year.js	Tue Nov 15 17:42:57 2016 +0100
@@ -10,6 +10,8 @@
     classNameBindings: ['isDisabled:disabled', 'isDark:light-color', 'isHighlighted:highlighted'],
     attributeBindings: ['style', 'title', 'id'],
 
+    colorScale: null,
+
     isDisabled: Ember.computed('range', 'year', 'count', function() {
         let year = parseInt(this.get('year'));
         let count = this.get('count');
@@ -27,8 +29,9 @@
         return this.get('colors').getPerceptiveLuminance(backgroundColor) >= 0.5;
     }),
 
-    backgroundColor: Ember.computed('count', 'maxCount', 'minCount', function() {
-        return this.get('colors').shadeLinear(this.get('count'), this.get('minCount'), this.get('maxCount'));
+    backgroundColor: Ember.computed('count', function() {
+        return this.get('scale')(this.get('count'));
+        //return this.get('colors').shadeLinear(this.get('count'), this.get('minCount'), this.get('maxCount'));
     }),
 
     style: Ember.computed('backgroundColor', 'isDisabled', 'isHighlighted', function() {
@@ -56,6 +59,4 @@
     year: null,
     datestats: null,
     range: null,
-    maxCount: null,
-    minCount: null,
 });