You can simulate this with an overlaid chart in Flex 1.5.

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"; 
xmlns="*"
    width="100%" height="100%" backgroundColor="#FFFFFF" 
    initialize="adjustData()">

    <mx:Script>

        <![CDATA[

        var data: Array = [{a: 25, b: 10}, {a: 50, b: 40}, {a: 62, 
b: 38}, {a: 20, b: 50}, {a: 25, b: 25}];
        var trend: Number = 50;

        function adjustData() {
            for (var i = 0; i < data.length; i++) {
                data[i].trend = trend;
                data[i].b += data[i].a;
            }
        }

        ]]>

    </mx:Script>

    <mx:ColumnChart id="chart" dataProvider="{data}" width="100%" 
height="100%" type="overlaid">

        <mx:series>
            <mx:Array>
                <mx:ColumnSeries yField="b" name="Value B"/>
                <mx:ColumnSeries yField="a" name="Value A"/>
                <mx:LineSeries yField="trend" name="Trend">
                    <mx:stroke>
                        <mx:Stroke color="#C00000" weight="2"/>
                    </mx:stroke>
                </mx:LineSeries>
            </mx:Array>
        </mx:series>

    </mx:ColumnChart>

</mx:Application>


--- In [email protected], "Carlos" <[EMAIL PROTECTED]> 
wrote:
>
> Errr... let me clarify...
> 
> 1. The effect that I'm trying to achieve is showing a stacked area
> chart with y-axis from 1 to 100.  Overlaying (sp?) the chart, I 
want
> to draw a single line at y=50 to show stacked values potentially
> exceeding this cap.
> 
> 2. This is for Flex 1.5, and will be for Flex 2.0
> 
> - Carlos
> 
> 
> --- In [email protected], "Carlos Balacuit"
> <Carlos.Balacuit@> wrote:
> >
> > Is there a way to add a trend line, with a constant value, to a
> > stacked AreaChart?  I've tried just a LineSeries to 
areaChart.series,
> > but because the chart is type="stacked", the values stack on top 
of
> > the trend line.
> >
> > Can a chart have a set of series that are stacked,
> > and another set be overlaid?
> > 
> > Thanks in advance.
> > 
> > - Carlos
> >
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to