3 Replies Latest reply on Nov 17, 2009 1:54 AM by PoorOldCoder

    Newbie: trying to use XML in a Line Series.

    PoorOldCoder

      So, I have a similar question to my last one, how to connect some XML from an RPC to a line series. The XML comes across fine. Problem is, why does it not work below?

       

      The XML is simple, and I use dataProvider="{tsRPC.lastResult.TIMESERIES}"....then yField="DataPoint.Value"...but it does not work

       

      I have seen some examples that use the "data.something"...where data must be some internal object. I tried various combinations of everything.

       

       

      <TIMESERIES>
        <DataPoint Date="38000" Value="34.51"/>
        <DataPoint Date="38001" Value="35.06"/>

      ...

      </TIMESERIES>

       

          <mx:HTTPService id="tsRPC"
              url="http://localhost:6574/Test2/TimeSeriesServer"

              resultFormat="e4x">
          </mx:HTTPService>

       

      <mx:Panel title="LineChart and AreaChart Controls Example3"
              height="491" width="729" layout="horizontal" x="350" y="84">
              <mx:LineChart id="linechart" height="100%" width="100%"
                  paddingLeft="5" paddingRight="5"
                  showDataTips="true" dataProvider="{tsRPC.lastResult.TIMESERIES}">      
              <mx:horizontalAxis>
                  <mx:CategoryAxis id="ca" categoryField="DataPoint.Date" title="Date" />
              </mx:horizontalAxis>
                  <mx:series>
                      <mx:LineSeries yField="DataPoint.Value" form="curve" displayName="Profit" lineStroke="{s1}"/>
                  </mx:series>
              </mx:LineChart>
              <mx:Legend dataProvider="{linechart}"/>
          </mx:Panel>