if (d.measures[key] != null) {
if (d.measures[key].text != null) {
return d.measures[key].text;
+ } else if (d.measures[key].data != null) {
+ return d.measures[key].data;
} else {
return d.measures[key].val;
}
};
Treemap.prototype.getRatingColorScale = function () {
- var domain = [1, 2, 3, 4, 5];
- if (this.components().length > 0) {
- var colorMetricSample = this.colorMetric.value(_.first(this.components()));
- if (typeof colorMetricSample === 'string') {
- domain = ['A', 'B', 'C', 'D', 'E'];
- }
- }
+ var domain = ['A', 'B', 'C', 'D', 'E'];
return d3.scale.ordinal().domain(domain).range(this.colors5r);
};
component.msr.forEach(function (measure) {
measures[measure.key] = {
val: measure.val,
- fval: measure.frmt_val
+ fval: measure.frmt_val,
+ text: measure.text,
+ data: measure.data
};
});
return {