Here's a stumper for anyone out there (*cough* Alex).

 

I've got a CartesianChart with an AreaSeries that has an areaFill defined as
a LinearGradient (code below).  An example of this kind of styling can be
seen online at
http://livedocs.adobe.com/flex/3/html/help.html?content=charts_formatting_07
.html almost all the way to the bottom of the page.

 

My question is this.  Why does the Gradient only happen between the max and
min values in the dataProvider in that particular series?

 

Look at the link and specifically, look at the yellow AreaSeries.  The
gradientEntries are set to 0, .33 and .66 for ratio but you can see that
ratio is only applied between the min/max data points, not the minimum of
the chart and the max of the chart.

 

This is even more evident in my attachment (a screen shot of what I'm
working on).  The majority of the area is under the minimum value in the
dataProvider so the gradient is almost non-existent (I don't have ratio's
applied as you can see in the code below so it should be .5)

 

So, hopefully I've explained my situation enough to get my point across.
Can anyone explain why this is or point me in a direction to fix this in
order to get a full gradient?

 

Thanks!

 

 

CODE:

 

<mx:AreaSeries 

                                                                id
=             "floorSeries" 

 
showDataEffect                =             "{seriesEffect}" 

                                                                displayName
=             "Floor" 

                                                                form
=             "step"

                                                                yField
=             "floor"

                                                                xField
=             "historyDt"

                                                                >

 
<mx:areaStroke>

 
<mx:Stroke        

 
id                            =             "floorStroke"

 
weight  =             "{this.getStyle('floorStrokeWeight')}" 

 
alpha     =
"{Number(ArrayCollection(this.getStyle('floorAlphas')).getItemAt(0))}" 

 
color      =
"{uint(ArrayCollection(this.getStyle('floorColors')).getItemAt(0))}"

 
/>

 
</mx:areaStroke>

 
<mx:areaFill>

 
<mx:LinearGradient

 
id                            =             "floorFill"

 
angle     =             "90"

 
>

 
<mx:entries>

 
<mx:GradientEntry id="floorFillEntry1"
color="{uint(ArrayCollection(this.getStyle('floorColors')).getItemAt(0))}"
alpha="{uint(ArrayCollection(this.getStyle('floorAlphas')).getItemAt(0))}"
/>

 
<mx:GradientEntry id="floorFillEntry2"
color="{uint(ArrayCollection(this.getStyle('floorColors')).getItemAt(1))}"
alpha="{uint(ArrayCollection(this.getStyle('floorAlphas')).getItemAt(1))}"
/>

 
</mx:entries>

 
</mx:LinearGradient>

                </mx:areaFill>

                                </mx:AreaSeries>

 

Jake Churchill
CF Webtools
11204 Davenport, Ste. 100
Omaha, NE  68154
 <http://www.cfwebtools.com> http://www.cfwebtools.com
402-408-3733 x103

Reply via email to