Search code examples
actionscript-3apache-flexflex4flex3flex4.5

How add or remove new data to chart in flex dynamically?


Im trying to implement chart in flex which will automatically redraw when i add or remove data to data source.this is my datasource

public var expenses:ArrayCollection = new ArrayCollection([
            {Label:"Taxes", Value:2000},
            {Label:"Rent", Value:1000},
            {Label:"Bills", Value:100},
            {Label:"Car", Value:450},
            {Label:"Gas", Value:100},
            {Label:"Food", Value:200}
        ]);

is it possible? any ideas guys ?


Solution

  • Here is sample. If you cant understand then give me your email i will send you a simple code for flex chart

    http://blog.flexexamples.com/2007/11/25/adding-custom-labels-to-a-flex-columnchart-controls-column-series/