You could write a custom area renderer to do it. If you look at the code for the default area renderer, you'll see that it's computing the bounding box of the values of the series, and using that as the rectangle for the IFill.begin() call.  I believe area renderers are actually sized to fill the entire data area of the chart, so if instead you passed Rectangle(0,0,unscaledWidth,unscaledHeight) as the rectangle for the IFill.begin() call, you should get the effect you want.
 
Ely.
 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of twgonzalez01
Sent: Wednesday, November 01, 2006 1:53 PM
To: [email protected]
Subject: [flexcoders] Re: Linear Gradient with AreaChart bug?

I Went to create a test case (as the source code is part of a much
larger app) and realized what is happening.

In an area chart the linearGradient is only creating a Matrix
transformation between the Min and Max values within that Series, not
the min/max for the overal Y Axis. So if there is a small delta
between the min/max within the series, but the overall values are high
up on the Y axis you only have a very small area that the gradient
gets applied to.

Is there any way around this?

--- In [EMAIL PROTECTED]ups.com, "Ely Greenfield" <[EMAIL PROTECTED].> wrote:
>
>
>
>
> Tom, can you post a full sample with a description of what you're
> seeing, and what you expect to see?
>
> Gradients should fill the bounding box defined by the area series.
>
> E.
>
>
> ________________________________
>
> From: [EMAIL PROTECTED]ups.com [mailto:[EMAIL PROTECTED]ups.com] On
> Behalf Of twgonzalez01
> Sent: Wednesday, November 01, 2006 11:29 AM
> To: [EMAIL PROTECTED]ups.com
> Subject: [flexcoders] Linear Gradient with AreaChart bug?
>
>
>
> I am trying to create an area chart and use a LinearGradient at 90
> degrees (top-bottom) fill for the areaFill.
>
> The problem is that the matrix transformation appears to not be taking
> into account the full range of Y values, and all transitions are
> occuring in the very top of the chart. Maybe I am misunderstanding
> something?
>
> Here is sample code for a fill:
> <mx:areaFill>
> <mx:LinearGradient angle="90" >
> <mx:GradientEntry color="0xFF0000" ratio="0"/>
> <mx:GradientEntry color="0xFFFFFF" ratio="1"/>
> </mx:LinearGradient>
> </mx:areaFill>
>

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to