Unable to populate series name while plotting line graph.

Mar 12, 2013 at 9:51 AM
Hi,
I have a json object in the below format.
[{"articleName":"Spring","articleQuantity":[32,20,53,42,28,18,41,72,66,90,48,28]},{"articleName":"Struts","articleQuantity":[55,27,60,36,46,90,15,22,51,48,72,80]},{"articleName":"Hibernate","articleQuantity":[33,24,64,72,15,50,80,92,20,18,6,88]}]
I have written the below logic and its working absolutely fine.

series:[
                    {
                        name:'Spring',
                        data: []
                    },
                    {
                        name:'Struts',
                        data: []
                    },
                    {
                        name:'Hibernate',
                        data: []
                    }        
            ]



},
function requestData() {
  $.ajax({
      type: "GET",
      url: "graph.html",
          success: function(response){
              var chartData=[];

        for(var i=0;i<=pointSpr.length;i++){
            chartData=[];   
             $.each(pointSpr[i].articleQuantity, function(k, v){
                        chartData.push(v);
                    });

          chart.series[i].setData(chartData);

        }
          },
         error: function(e){
                  alert('Error: ' + e);

              }


  })
}
);
});

});


But my problem is, if you look at the series name i,e Spring ,Struts and Hibernate, its all hard coded and i am want this thing to be dynamically taken instead of hard coding. I am using Spring MVC and HighCharts.Kindly help me out. Thanks in advance.