Advertisement

03.12.2008 at 10:04AM PDT, ID: 23235830
[x]
Attachment Details

linking plot chart with external data

Asked by CoreNeter in Adobe Flex, Macromedia Flash

Tags: Flex

How can I restructure this so that I can read the plotchart data from an external file?
What would be the format of the data in this file?

(xml would be ideal as I could have several y's to plot for every x)

Thanks

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        <![CDATA[
 
        import mx.collections.ArrayCollection;
 
        [Bindable]
        private var expensesAC:ArrayCollection = new ArrayCollection( [
            {x: 2000, y: 1500},
            {x: 1000, y: 200},
            {x: 1500, y: 500} ]);
        ]]>
    </mx:Script>
 
    <mx:Panel title="PlotChart Control Example" height="100%" width="100%">
 
        <mx:PlotChart id="plot" height="100%" width="100%"
            paddingLeft="5" paddingRight="5" 
            showDataTips="true" dataProvider="{expensesAC}">
                
            <mx:series>
                <mx:PlotSeries xField="x" yField="y" displayName="x vs y"/>
            </mx:series>
        </mx:PlotChart>
 
        <mx:Legend dataProvider="{plot}"/>
 
    </mx:Panel>
</mx:Application>
[+][-]03.12.2008 at 11:30PM PDT, ID: 21113773

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Adobe Flex, Macromedia Flash
Tags: Flex
Sign Up Now!
Solution Provided By: hobbit72
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.12.2008 at 11:30PM PDT, ID: 21113777

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628