title: creating dynamic lineseries in linechart
body: <p>This is my array collection</p>
  
  <pre><code> [Bindable]private var Projects:ArrayCollection = new ArrayCollection( [
                  { Department: "Software", TotalProjects: 73,Completed:30,Inprogress:30,Approved:13},
                  { Department: "XML",TotalProjects: 50,Completed:20,Inprogress:20,Approved:10},
                  { Department: "Publishing",TotalProjects: 25,Completed:5,Inprogress:10,Approved:10},
                  { Department: "Indesign", TotalProjects: 70,Completed:30,Inprogress:30,Approved:10},
                  { Department: "Imaging", TotalProjects: 42,Completed:30,Inprogress:10,Approved:2}]);
  </code></pre>
  
  <p>line series for line chart:</p>
  
  <pre><code>&lt;mx:series&gt;
  
  
  &lt;mx:LineSeries id="cs1"
                                     yField="TotalProjects"
                                     xField="Department"
                                     displayName="TotalProjects"&gt;
  
                  &lt;/mx:LineSeries&gt;
                  &lt;mx:LineSeries id="cs2"
                                 yField="Inprogress"
                                 xField="Department"
                                 displayName="Inprogress"&gt;
  
                  &lt;/mx:LineSeries&gt;
                  &lt;mx:LineSeries id="cs3"
                                 yField="Completed"
                                 xField="Department"
                                 displayName="Completed"&gt;
  
                  &lt;/mx:LineSeries&gt;
                  &lt;mx:LineSeries id="cs4"
                                 yField="Approved"
                                 xField="Department"
                                 displayName="Approved"&gt;
  
                  &lt;/mx:LineSeries&gt;
  
  
              &lt;/mx:series&gt;
  </code></pre>
  
  <p>how can i create <code>mx:LineSeries</code> dynamically depending upon array collection values. Now only 4 line series is there but some times i have to show more as per the array collection values change ex: if one more status <code>HoldProject</code> added to array collection?</p>