title: Fill chart data from API in angular using ngx-pie-charts
body: <p>i am newbie in angular , below is the code that consuming API and get data in (name,value) pairs to fill data in pie chart but chart is only showing single record, and i have X records, what i am doing wrong in below code.
  Thank you in advance</p>
  
  <pre><code>  this.service.getsubordintesummary(30).subscribe(res=&gt;
     {
              this.subordinatesummary=res as subordinatesummary[]; 
         for(i=0;i&lt;=this.subordinatesummary.length;i++)
           {
             this.widget7.device=
          [
             {
               name:this.subordinatesummary[0].subordinates[i].Description,
               value:this.subordinatesummary[0].subordinates[i].EmpCount,
             }
         ]
      }
    }
  
  
   })
  </code></pre>
  
  <p>JSON DATA:</p>
  
  <pre><code>[
    {
     "total":10,
       "subordinates":
         [
           {"Description":"IT sector","Ecount":1},
           {"Description":"MWS sector","Ecount":3}
         ]
    }
  ]
  </code></pre>