Junaid Syed

Junaid Syed

  • NA
  • 485
  • 128.1k

How can i append Dynamic data to highchart in angularjs

Dec 7 2017 12:36 AM
hi iam trying to append data to highchart my code is something like this
  1. app.controller("aboutcontroller"function ($scope, $http,$window) {  
  2.     $http.get("/angularsample/Test").then(function (response) {  
  3.         var abc= response.data;  
  4.   
  5.         Highcharts.chart("container", {  
  6.             chart: {  
  7.                 type: 'column'  
  8.             },  
  9.             xAxis: {  
  10.                 categories: ['Jan''Feb''Mar''Apr''May''Jun''Jul''Aug''Sep''Oct''Nov''Dec']  
  11.             },  
  12.             yAxis:{  
  13.               title:{text:'value'}    
  14.             },  
  15.             series: [{  
  16.                 data: DynamicData  
  17.             }],  
  18.             plotOptions: {  
  19.                 series: {  
  20.                     pointWidth: 50  
  21.                 }  
  22.             },  
  23.           
  24.         })  
  25.   
  26.     });  
  27. }); 
I am getting the dynamic data from "/angularsample/Test" into and the data iam getting into console like shown below
 
 
 
But the in output the data is not appending to chart. My output is something like below
 
 
 
 
If we see in above output image iam getting 5 months i.e from jan to may as per the data i have 5 in array. But its not getting append in to the chart. Please help me out.Thank you.

Answers (1)