A color model that returns a color from a data value using an interpolation between two extremum colors around the mean value.
Parameter | Type | Description |
---|---|---|
startColor | dojo/_base/Color | The start color. |
endColor | dojo/_base/Color |
Optional The end color. |
See the dojox/color/MeanColorModel reference documentation for more information.
Parameter | Type | Description |
---|---|---|
from | undefined | |
to | undefined | |
value | undefined |
Return the neutral value in this case the mean value of the data values.
Parameter | Type | Description |
---|---|---|
min | Number | The minimal value. |
max | Number | The maximum value. |
sum | Number | The sum of all values. |
values | Number[] | The sorted array of values used to compute colors. |
return the color for a given data value.
Parameter | Type | Description |
---|---|---|
value | Number | The data value. |
Return the normalized (between 0 and 1) value for a given data value. This implementation uses an power function to map neutral value to 0.5 and distribute other values around it.
Parameter | Type | Description |
---|---|---|
value | Number | The data value |
Initialize the color model from a list of data items and using a function that returns the value used to compute the color for a given item.
Parameter | Type | Description |
---|---|---|
items | Object[] | The data items. |
colorFunc | Function | The function that returns the value used to compute the color for particular data item. |