3

Can someone point me in the direction of what I should be tweaking to get deterministic color band? For example, if they array of colors contains 6 colors, I would like the values 10-30 to always go to the 5th color band, 50-80 to the 6th, etc.

(in case someone is wondering why I need such an odd thing, right now the value 30 shows up in several different colors, depending on what other values are in the set -- can be pretty confusing for a user over time). I thought of restricting the min and max values in the set to achieve stable colors but that would distort the lables. Also, ideally, I would like to specify the mapping of input data value to color myself

Yana K.
  • 1,926
  • 4
  • 19
  • 27

1 Answers1

3

This won't let you do arbitrary assignments of values to colors, but you can set the min and max values cubism uses to assign colors with the extent option:

var context = cubism.context();
var horizon = context.horizon();
horizon.extent([-80,80]);

The extent will then be divided up evenly among the color bands you have set.

Aaron
  • 81
  • 4