Chart Flex




    
        
        import mx.collections.ArrayCollection;
        private function handleChange(event:Event):void {
            var allSeries:Array = event.currentTarget.series;
            textArea1.text = "";
            for (var i:int=0; i                textArea1.text += "\n" + allSeries[i].id + " Selected Items: " + allSeries[i].selectedIndices;
            }
        }
        [Bindable]
        public var expenses:ArrayCollection = new ArrayCollection([
            { Expense:"Taxes", Amount:2000 },
            { Expense:"Rent", Amount:1000 },
            { Expense:"Food", Amount:200 } ]);
        [Bindable]
        private var medalsAC:ArrayCollection = new ArrayCollection( [
            { Country: "A", Gold: 35, Silver:39, Bronze: 29 },
            { Country: "B", Gold: 32, Silver:17, Bronze: 14 },
            { Country: "C", Gold: 27, Silver:27, Bronze: 38 },
            { Country: "D", Gold: 15, Silver:15, Bronze: 10 },
            { Country: "E", Gold: 15, Silver:10, Bronze: 10 } ]);
        [Bindable]
        private var profitsAC:ArrayCollection = new ArrayCollection( [
            { Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
            { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
            { Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 },
            { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
            { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);
      
    

    
        
                            dataProvider="{medalsAC}" selectionMode="multiple"
                change="handleChange(event)">
                
                    
                

                
                                            displayName="Gold" selectable="true" />
                                            xField="Silver" displayName="Silver" selectable="true" />
                                            xField="Bronze" displayName="Bronze" selectable="true" />
                

            
            
        
        
                            showDataTips="true" selectionMode="multiple"
                change="handleChange(event)">
                
                                            nameField="Expense" labelPosition="callout" />
                

            
            
        
        
                            dataProvider="{profitsAC}" selectionMode="multiple"
                change="handleChange(event)">
                
                                            yField="Profit" displayName="Expenses/Profit"
                        selectable="true" />
                                            yField="Expenses" displayName="Amount/Expenses"
                        selectable="true" />
                                            yField="Amount" displayName="Profit/Amount"
                        selectable="true" />