How do I display positive values near zero as red, but larger values as green?
I noticed that in some of the examples that if the data contains
only positive numbers for the field that controls the color, then the color is always
"green". Some of our data is likely to contain positive values only where the closer a
value is to 0 the more "red" it should be and the higher the value, the more "green" it should be.
Is there a way to configure this mapping of the color to the value?
Try one of the following color schemes:
<colorScheme label="Red-Black-Green (Red = 0)">
<colorPoint value="0" color="#FF0000" />
<colorPoint position="50" color="#000000" />
<colorPoint position="100" color="#00FF00" />
</colorScheme>
This color scheme says that the closer a value gets to 0, the redder it will be.
As the value approaches the median (half way or 50% between the minimum and maximum values),
it will get darker until it becomes black, then finally as the value approaches the max it
will become greener.
<colorScheme label="Red-Black-Green (All Relative)">
<colorPoint position="0" color="#FF0000" />
<colorPoint position="50" color="#000000" />
<colorPoint position="100" color="#00FF00" />
</colorScheme>
This color scheme is the same as the first, except the reddest value will be the minimum
value in the data set. This differs from the first one, which may not show any bright red
if none of the values are near 0.
<colorScheme label="Red-Green (Red = 0)">
<colorPoint value="0" color="#FF0000" />
<colorPoint position="100" color="#00FF00" />
</colorScheme>
This color scheme removes the black entirely and says that value 0 should be bright red
and then it should blend to green as it approaches the maximum value. This will result in
green, red, and then muddled brown cells.
For more ideas, check out the example under Applet > Colors > Color Scheme Library in Enterprise Tree Map v2.1 or
higher, which contains a library of different color schemes you can use.
|