1 Reply Latest reply on Aug 10, 2010 3:02 AM by Balakrishnan V

    How to do mutliple lines on a Flex 4 chart

    pk1023

      Hey guys,

       

      I need some help. I am trying to render a chart with 20 seperate lines all on the same axises. Basically it's a chart to show 20 different point values over the space of 24 hours. So for each of the 20 nodes, I have a set of data for each 5 minute period.

       

      I am not exactly sure how to accomplish this in Flash Bldr 4.

       

      Here's my data. Now I will mention that I chose to make the XML very flat and repetitive because I thought it would help. I have considered changing the XML to be more structured, like making an element for each of the 20 nodes and then having child elements with all the timestamp,values in it.

       

      Why do I do, where do I start?

       

      <?xml version="1.0" encoding="UTF-8" ?>
      - <nsiData>
      <interface timestamp="2010-04-29 03:58:00" name="BREC" value="0.0" />
      <interface timestamp="2010-04-29 03:58:00" name="DPC" value="-163.0" />
      <interface timestamp="2010-04-29 03:58:00" name="EEI" value="-800.0" />
      <interface timestamp="2010-04-29 03:58:00" name="EES" value="0.0" />
      <interface timestamp="2010-04-29 03:58:00" name="EKPC" value="-17.0" />
      <interface timestamp="2010-04-29 03:58:00" name="LGEE" value="-99.0" />
      <interface timestamp="2010-04-29 03:58:00" name="MHEB" value="-72.0" />
      <interface timestamp="2010-04-29 03:58:00" name="MISO" value="-3583.0" />
      <interface timestamp="2010-04-29 03:58:00" name="MOWR" value="0.0" />
      <interface timestamp="2010-04-29 03:58:00" name="ONT" value="-489.0" />
      <interface timestamp="2010-04-29 03:58:00" name="OVEC" value="-168.0" />
      <interface timestamp="2010-04-29 03:58:00" name="PJM" value="-984.0" />
      <interface timestamp="2010-04-29 03:58:00" name="SPA" value="0.0" />
      <interface timestamp="2010-04-29 03:58:00" name="SPC" value="75.0" />
      <interface timestamp="2010-04-29 03:58:00" name="SWPP" value="-15.0" />
      <interface timestamp="2010-04-29 03:58:00" name="TVA" value="0.0" />
      <interface timestamp="2010-04-29 03:58:00" name="WAUE" value="-311.0" />
      <interface timestamp="2010-04-29 03:58:00" name="WFEC" value="-556.0" />
      <interface timestamp="2010-04-29 03:59:00" name="AECI" value="16.0" />
      <interface timestamp="2010-04-29 03:59:00" name="BREC" value="0.0" />
      <interface timestamp="2010-04-29 03:59:00" name="DPC" value="-163.0" />
      <interface timestamp="2010-04-29 03:59:00" name="EEI" value="-800.0" />
      <interface timestamp="2010-04-29 03:59:00" name="EES" value="0.0" />
      <interface timestamp="2010-04-29 03:59:00" name="EKPC" value="-17.0" />
      <interface timestamp="2010-04-29 03:59:00" name="LGEE" value="-99.0" />
      <interface timestamp="2010-04-29 03:59:00" name="MHEB" value="-72.0" />
      <interface timestamp="2010-04-29 03:59:00" name="MISO" value="-3584.0" />
      <interface timestamp="2010-04-29 03:59:00" name="MOWR" value="0.0" />
      <interface timestamp="2010-04-29 03:59:00" name="ONT" value="-489.0" />
      <interface timestamp="2010-04-29 03:59:00" name="OVEC" value="-168.0" />
      <interface timestamp="2010-04-29 03:59:00" name="PJM" value="-984.0" />
      <interface timestamp="2010-04-29 03:59:00" name="SPA" value="0.0" />
      <interface timestamp="2010-04-29 03:59:00" name="SPC" value="75.0" />
      <interface timestamp="2010-04-29 03:59:00" name="SWPP" value="-15.0" />
      <interface timestamp="2010-04-29 03:59:00" name="TVA" value="0.0" />
      <interface timestamp="2010-04-29 03:59:00" name="WAUE" value="-312.0" />
      <interface timestamp="2010-04-29 03:59:00" name="WFEC" value="-556.0" />
        • 1. Re: How to do mutliple lines on a Flex 4 chart
          Balakrishnan V Level 3

          <mx:LineChart id="linechart" height="100%" width="100%"
                      showDataTips="true" dataProvider="{}">
                          
                      <mx:horizontalAxis>
                          <mx:CategoryAxis categoryField=""/>
                      </mx:horizontalAxis>
          
                      <mx:series>
                          <mx:LineSeries yField="" form="" displayName="" lineStroke="{}"/>
                          <mx:LineSeries yField="" form="" displayName="" lineStroke="{}"/>
                          <mx:LineSeries yField="" form="" displayName="" lineStroke="{}"/>
                      </mx:series>
          </mx:LineChart>

           

          Hope this helps

           

          Balakrishnan V