ember-charts icon indicating copy to clipboard operation
ember-charts copied to clipboard

ScatterChart colors does not work properly

Open brandonparsons opened this issue 11 years ago • 1 comments

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

brandonparsons avatar Jun 15 '14 21:06 brandonparsons

Just wanted to say - thanks for mentioning it! We'll take a look when we can.

azirbel avatar Jul 19 '14 01:07 azirbel