Hi,
I seem to be having a problem with the colors in my Treemaps. An
example is below (it can be copy and pasted into the Visualization
Playground).
Here's the situation:
- I've defined column 4 to have the same values as column 3. This
should mean that color will be assigned according to size (same size
means you get the same color).
- When you look at the treemap, Asia is bigger than America. This is
correct.
The problem is that Asia has nearly the same color as America. In
fact, if you watch the scale while moving your mouse back and forth
from America to Asia, you'll see that the color for America is a
little *higher* than that for Asia.
What's going on here? This has been confusing me for a while, and I'm
nearly convinced it's a bug.
thanks for any tips on what's happening. Snippet below.
function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Location');
data.addColumn('string', 'Parent');
data.addColumn('number', 'Market trade volume (size)');
data.addColumn('number', 'Market increase/decrease (color)');
data.addRows([
["Global",null,0,0],
["America","Global",0,0],
["Europe","Global",0,0],
["Asia","Global",0,0],
["Mexico","America",1,1],
["Canada","America",3,3],
["France","Europe",20,20],
["Germany","Europe",1,1],
["China","Asia",1,1],
["Japan","Asia",2,2],
["xxx","Asia",2,2],
["yyy","Asia",2,2],
["xzzzxx","Asia",2,2],
]);
// Create and draw the visualization.
var treemap = new
google.visualization.TreeMap(document.getElementById('visualization'));
treemap.draw(data, {
minColor: 'red',
midColor: '#ddd',
maxColor: '#0d0',
headerHeight: 15,
fontColor: 'black',
showScale: true});
}
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.