Color for individual rectangles

1 view
Skip to first unread message

Jan Mechtel

Apr 25, 2009, 1:36:09 PM4/25/09
to juicekit
I got the treemap to work. Really nice work thank you for making this

Just wondering how I could set the color of individual rectangles
freely (instead of the value on a gradient between two colors).

Thanks for hints



Apr 25, 2009, 4:04:50 PM4/25/09
to juicekit

Step #1: On Monday, I will put a patch to change:
private function get colorPalette():ColorPalette {
protected function get colorPalette():ColorPalette {

If you need the change sooner, you can always make the change yourself
in a temporary branch.

Step #2: You can need to derive a specific class from TreeMapControl
and return a different ColorPalette instance with your color values.
The documentation for ColorPalette is in the Flare module.

You must still map a data value to a color as the controls are data
driven. You will just be mapping a particular data value to a
particular color to get the effect you want.


Jan Mechtel

Apr 25, 2009, 4:17:53 PM4/25/09
Hi Jon,
thanks for the quick reply. i actually have only gotten into
programming Flex because of juicekit. I might give it a try tomorrow.
But also git is new to me and until now I was able to just use the
treemap component and not actually compile it myself.

Your methods sounds good, lets see if I got the time tomorrow
otherwise I would really appreciate you putting it in on Monday!

Have a nice weekend.


2009/4/25 Jon <>:
Jan Mechtel
+49 30 8101 9870
Reply all
Reply to author
0 new messages