Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This may help you, i have created example with respect to HTTPService: -</p> <p>You can implement logic as per above comment for you question.</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init();switchImage()"&gt; &lt;fx:Declarations&gt; &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt; &lt;!--&lt;fx:Model id="results" /&gt;--&gt; &lt;s:HTTPService id="results" result="resultHandler(event)" fault="{trace('Fault')}" /&gt; &lt;/fx:Declarations&gt; &lt;fx:Script&gt; &lt;![CDATA[ import mx.rpc.events.ResultEvent; private function init():void { var timer:Timer = new Timer(2000); timer.addEventListener(TimerEvent.TIMER, switchImage); timer.start(); } private function switchImage(event:TimerEvent = null):void { //url as external URL outside of project folder results.url = "C:/data/data.xml"; results.send(); } private function resultHandler(event:ResultEvent):void { myChart.dataProvider = null; myChart.dataProvider = event.result.data.result; } ]]&gt; &lt;/fx:Script&gt; &lt;mx:Panel title="Line Chart"&gt; &lt;mx:LineChart id="myChart" showDataTips="true" width="600" height="240"&gt; &lt;mx:horizontalAxis&gt; &lt;mx:CategoryAxis categoryField="month"/&gt; &lt;/mx:horizontalAxis&gt; &lt;mx:series&gt; &lt;mx:LineSeries yField="banana" displayName="Banana"/&gt; &lt;mx:LineSeries yField="apple" displayName="Apple"/&gt; &lt;mx:LineSeries yField="orange" displayName="Orange"/&gt; &lt;/mx:series&gt; &lt;/mx:LineChart&gt; &lt;mx:Legend dataProvider="{myChart}"/&gt; &lt;/mx:Panel&gt; &lt;/s:Application&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload