How To Provide Data To Animated Time-line Pie Amcharts?
I am trying to push data dynamically during runtime for the Animated Time-Line Pie Chart Here is the code: var array = new Array(); function pushvalue(curyear,curmonth,monvalue){
Solution 1:
The syntax for assigning a new year is wrong. You can't do "Year": varname: [ ... ] in one line. You'll want to change it to something like this:
for (var i = 0; i < array.length; ++i) {
if (!chartData[array[i].year]) {
chartData[array[i].year] = [];
}
chartData[array[i].year].push({"Month": array[i].month, "Count": array[i].count });
}
Demo using some fake values: http://jsfiddle.net/9428r6fw/4/
Also note that your pushvalue
method is wrong - your parameter for the count is named monvalue
but you're trying to push moncount
Post a Comment for "How To Provide Data To Animated Time-line Pie Amcharts?"