Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

ScatterChart colors does not work properly #25

Open
brandonparsons opened this issue Jun 15, 2014 · 1 comment
Open

ScatterChart colors does not work properly #25

brandonparsons opened this issue Jun 15, 2014 · 1 comment
Labels

Comments

@brandonparsons
Copy link

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

@azirbel azirbel added the bug label Jul 19, 2014
@azirbel
Copy link
Contributor

azirbel commented Jul 19, 2014

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants