2 Replies Latest reply on Jun 18, 2008 12:01 PM by madhooper

    Any quick Flex 3 charting tutorials or examples

    madhooper Level 1
      I'm looking for basic Flex 3 charting tutorials or examples. So far everything i've found works in Flex 2.
        • 1. Re: Any quick Flex 3 charting tutorials or examples
          matthew horn Level 3
          There's a blog entry on drilling down into date on the Flex doc blog here:


          For basic charting functionality, Flex 2 and Flex 3 charting APIs are not much different. You could probably follow any Flex 2 charting tutorials in Flex Builder 3 (or using the Flex 3 SDK) without having to make significant changes to the code.

          matt horn
          flex docs
          • 2. Re: Any quick Flex 3 charting tutorials or examples
            madhooper Level 1
            Thanks for the response. I tried a Flex 2 Charting tut and i get a binding error. Here's the error and code below.

            Parse error at '\n\n\t[Bindable]\n\tprivate var stats:ArrayCollection;\n\t\n\tprivate function dataRequestHandler(event:ResultEvent):void {\n\tstats = event.result.data.row;\n\t}\n\t\n\tprivate function dataRequestFaultHandler(event:FaultEvent):void {\n\tAlert.show(event.fault.message);\n\t}\n\t\n\t\n\t\n\t'. ChartingTutorial/src ChartingTutorial.mxml line 12 1213301783191 474

            <?xml version="1.0" encoding="utf-8"?>
            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="dataRequest.send()">
            <mx:HTTPService id="dataRequest" url="stats.xml" result="dataRequestResultHandler(event);" fault="dataRequestFaultHandler(event);" />

            import mx.controls.Alert;
            import mx.rpc.events.FaultEvent;
            import mx.rpc.events.ResultEvent;
            import mx.collections.ArrayCollection;

            private var stats:ArrayCollection;

            private function dataRequestHandler(event:ResultEvent):void {
            stats = event.result.data.row;

            private function dataRequestFaultHandler(event:FaultEvent):void {

            <mx:ColumnChart x="164" y="154" id="columnchart" dataProvider="{stats}">
            <mx:ColumnSeries displayName="Expenses" yField="expenses"/>
            <mx:ColumnSeries displayName="Revenue" yField="revenue"/>
            <mx:ColumnSeries displayName="Profit" yField="profit"/>
            <mx:Legend dataProvider="{columnchart}"/>