I've never tried it before until now, but you can do it and its
actually quite easy to make cushioned treemaps with the JIT.
See for example my top 50 artists as cushioned treemap:
http://javascript-information-visualization-toolkit.googlegroups.com/web/cushioned.png?gsc=FaZ0HxYAAADDpvkZP66QmjkNjXNwSuvGg-kXU5InE09W2o0GCSVgCQ
So what I did is basically a radial gradient png image (with
transparency) and overriden the leafBox method (that renders the
leaves of the trees) and added an <img> inside the leaf div.
I used the "implement" method for the TM.Squarified class (provided by
Mootools). So just before instanciating the treemap I added this code:
TM.Squarified.implement({
leafBox: function(json, coord) {
var config = this.config;
var backgroundColor = config.Color.allow && this.setColor(json),
offst = config.offset,
width = coord.width - offst,
height = coord.height - offst;
var c = {
'top': (offst / 2) + "px",
'height':height + "px",
'width': width + "px",
'left': (offst / 2) + "px"
};
if(backgroundColor) c['background-color'] = backgroundColor;
return "<div class=\"leaf\" style=\"" + this.toStyle(c) + "\">"
+ "<img src=\"/static/img/gradient.png\"
style=\"position:absolute; z-index:2; top:0; left:0; width:" + c.width
+ "; height:"+ c.height +"; \" />"
+
json.name + "</div>";
}
});
This code is exactly the same as the leafBox method defined in the
library except for the line:
"<img src=\"/static/img/gradient.png\" style=\"position:absolute;
z-index:2; top:0; left:0; width:" + c.width + "; height:"+ c.height
+"; \" />"
Hope it helps,
--
I would never die for my beliefs because I might be wrong.
Bertrand Russell