<mx:ColumnChart type="stacked">
On Mon, Mar 16, 2009 at 10:48 PM, kotha poornima <[email protected]>wrote: > Hi, > Please find the code below. > > <?xml version="1.0"?> > <!-- charts/BasicColumn.mxml --> > > <mx:Script><![CDATA[ > import mx.collections.ArrayCollection; > [Bindable] > public var expenses:ArrayCollection = new ArrayCollection([ > {Month:"Jan", Profit:2000, loss:200, Expenses:1500}, > {Month:"Feb", Profit:1000, loss:200, Expenses:200}, > {Month:"Mar", Profit:1500, loss:200, Expenses:500} > ]); > ]]></mx:Script> > <mx:Panel title="Column Chart"> > <mx:ColumnChart id="myChart" dataProvider="{expenses}" type="100%"> > <mx:horizontalAxis> > <mx:CategoryAxis > dataProvider="{expenses}" > categoryField="Month" > /> > </mx:horizontalAxis> > <mx:series> > <mx:ColumnSeries > xField="Month" > yField="Profit" > displayName="Profit"/> > <mx:ColumnSeries > xField="Month" > yField="Expenses" > displayName="Expenses"/> > > <mx:ColumnSeries > xField="Month" > yField="loss" > displayName="Loss"/> > <mx:ColumnSeries > xField="Month" > yField="Expenses" > displayName="Expenses"/> > </mx:series> > </mx:ColumnChart> > <mx:Legend dataProvider="{myChart}"/> > </mx:Panel> > </mx:Application> > > Thanks in Advance, > Poornima > ------------------------------ > *From:* duraibalaji <[email protected]> > *To:* [email protected] > *Sent:* Monday, March 16, 2009 8:00:52 PM > *Subject:* Re: [flexcoders] Flex charting > > > Hi Poorni, > > Can you post the code, > let me try to modify the same and send it to you. > > Regards > DB > > kotha poornima wrote: > > > > Hi All, > > > > I have one arraycollection like this: > > > > public var expenses:ArrayColle ction = new ArrayCollection( [ > > {Month:"Jan" , Profit:2000, loss:200, Expenses:1500} , > > {Month:"Feb" , Profit:1000, loss:200, Expenses:200} , > > {Month:"Mar" , Profit:1500, loss:200, Expenses:500} > > ]); > > > > With this iam drawing a column chart. > > so i added two column series one for profit and one for expenses. So i > got > > output like for the first key two lines came orange and green one for > > profit and one for expenses. > > > > But i want to combine these two lines so i put type="100%" > > With this iam getting green and orange in the same line with values > > adjusted to 100%. > > > > Up to this its working fine. > > But now i want another series for the same key with loss and expenses. > > However if i add these two series to the chart iam still getting one line > > with 4 colors. But i want profit and expenses with type="100%" in one > line > > and loss and expenses in one line with type="100%" for one key.(Shown in > > the attachment "type1.bmp") . Please help me guys!!! > > > > Thanks in Advance, > > Poornima > > > > > > > > > > > > > > -- > View this message in context: http://www.nabble. com/Flex- charting- > tp22534734p22539 > 460.html<http://www.nabble.com/Flex-charting-tp22534734p22539460.html> > Sent from the FlexCoders mailing list archive at Nabble.com. > > > > -- Brendan Meutzner http://www.meutzner.com/blog/ http://www.riajobs.com

