Hi I am using highchart API for generating graph in loop
for(i=1;i<10;i++)
{
xseries = "{'INCOPAV','B&M','SGS-ETSA'}";
yseries = "[{name: 'Generados',data: [49.9, 71.5, 106.4]}, {name: 'Cerrados',data: [83.6, 78.8, 98.5]}]";
generateAllGraph('graph_container'+i,'abcd'+i,xseries,yseries);
}
function generateAllGraph(container,graphTitle,XaxesSeries,YaxesSeries)
{
$('#'+container+'').highcharts({
chart: {
renderTo: container,
type: 'column'
},
title: {
text: graphTitle
},
subtitle: {
text: ''
},
legend: {
itemStyle: {
fontSize: "10px"
}
},
xAxis: {
categories: [XaxesSeries]
},
yAxis: {
min: 0,
title: {
text: 'Registros'
}
},
tooltip: {
formatter: function() {
return ''+
this.x +': '+ this.y +' Registros';
}
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: YaxesSeries
});
}
but it is not taking X and Y axes as per argument
I think there is something wrong in passing X-axes and y-axes variable I tried it with using jQuery.parseJSON( ) but not getting result
and giving output like this
please help me
