With your current data structure, this should be:
$scope.todayChartConfig.series[0][0].data.push(
{
name: "Internet Explorer",
y: 56.33
},
{
name: "Chrome",
y: 30.12
}
);
What should work because:
$scope.chartConfig.series.push(
[{
name: "Brands",
colorByPoint: true,
data: []
}]
);
pushes an array of an object into an array.
However, if the code above is a typo and what you really intended:
$scope.chartConfig.series.push(
{
name: "Brands",
colorByPoint: true,
data: []
}
);
then it should be:
$scope.todayChartConfig.series[0].data.push(
{
name: "Internet Explorer",
y: 56.33
},
{
name: "Chrome",
y: 30.12
}
);
source
share