|
I'll leave making it compile as an exercise for the reader,
but something like:
class CycleRenderer implements
BoxRenderer
{ private var fills = [0xFF0000,0x00FF00,0x0000FF]; private var count:Number;
function
CycleRenderer()
{ } function beginDraw(target: UIObject, fill:Fill, stroke: Stroke, sampleCount : Number) { count =
0;
} function draw(target:UIObject, rc :
Rect)
{ target.beginFill( fills[count] ); target.moveTo(rc.left,rc.top);
target.lineTo(rc.right,rc.top); target.lineTo(rc.right,rc.bottom); target.lineTo(rc.left,rc.bottom); target.lineTo(rc.left,rc.top); target.endFill();
count++;
} function
endDraw(target:UIObject)
{ } function drawPreview(target:UIObject, rc: Rect, fill : Fill, stroke : Stroke) { count = 0;
draw(target, rc); } } Ely.
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Miranda Sent: Thursday, February 16, 2006 10:19 AM To: [email protected] Subject: RE: [flexcoders] Column Chart coloring Hmm, after messing
around with this I can’t get it to cycle any type of array because it seems to
only accept one color…and I can’t figure out how the renderer can reference
which item it’s actually on. Best I’ve got so far is just changing one color.
Fill (heh, bad joke) up to mocking an example? _________________________________________ Jonathan
Miranda Flexible
Master of the Web "In the game of
chess, it's important to never let your opponent see your
pieces." From:
You could write a
custom renderer for the chart that ignores the colors passed in and just cycles
through a pre-defined array of colors. Ely. From:
Also, something else I’m having
trouble finding documentation on…. _________________________________________ Jonathan
Miranda Flexible Master
of the Web "In the game of chess, it's important to
never let your opponent see your pieces." -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Column Chart coloring Jonathan Miranda
- RE: [flexcoders] Column Chart coloring Ely Greenfield
- RE: [flexcoders] Column Chart coloring Jonathan Miranda
- RE: [flexcoders] Column Chart coloring Ely Greenfield
- RE: [flexcoders] Column Chart coloring Jonathan Miranda
- [flexcoders] Re: Column Chart coloring Doug Lowder

