ember-charts
ember-charts copied to clipboard
ScatterChart colors does not work properly
The current code in dist uses the following in the ScatterChartComponent:
getGroupColor: Ember.computed(function() {
var _this = this;
return function(d, i) {
var colorIndex;
colorIndex = 0;
if (_this.get('displayGroups')) {
i = _this.get('groupNames').indexOf(d.group);
colorIndex = Math.floor(i / _this.get('numGroupShapes'));
}
return _this.get('colorScale')(colorIndex / _this.get('numGroupColors'));
};
}),
I'm not quite sure what you are trying to do here, but using the iterating i variable as a local var doesn't quite seem to work properly, and you always get the same color. I've over-ridden this function in my own code to do something custom, but figured I'd mention this.
/cc @bigsley
Just wanted to say - thanks for mentioning it! We'll take a look when we can.