1 Reply Latest reply on Apr 7, 2008 10:03 PM by Sreenivas R

    Help grouping chart data

      I have a line chart with each axi defined as follows; x is defined by time, and y is defined by bytes. My issue is the data is coming across for two unique points, each identified by the interface_name field. Is there any way to group the line series by the interface_name field? I have no control of how the data comes to me, so I have to use it as is. Also, the interface_name value is dynamic.

      <bytes type="integer">21344457</bytes>
      <time>Sat Mar 29 15:01:00 UTC 2008</time>
      <interface_name>Controller 2</interface_name>
      <bytes type="integer">56743</bytes>
      <time>Sat Mar 29 15:02:00 UTC 2008</time>
      <interface_name>Controller 1</interface_name>

      In my current implementation I go through all the data. Pull out each unique interface_name and create a line series for this interface_name. I then split the data out into separate arraycollections and assign this as the dataprovider to the corresponding line series.

      I'm wondering if there is a much simpler way to do this. Something easy that I overlooked.

        • 1. Help grouping chart data
          Sreenivas R Adobe Employee
          Hope you are using e4x format for your data and separating them using the e4x filtering mechanisms like

          var control1List:XMLIst = input.record.(interface_name == "Controller 1");
          var control2List:XMLIst = input.record.(interface_name == "Controller 2");

          after determining the unique interface_names from the total name list which can be obtained as

          var nameList:XMLList = input.record.interface_name.text();