Open chrismp opened 7 years ago
I had the same problem initially. It turned out to be the same issue listed here, which is that the data
field you provide to nvd3 is expected to be an array (which has a map
method), rather than an object (which does not have a map
method). So I would try changing this line:
$scope.data= nvd3Obj;
into
$scope.data = [nvd3Obj];
Thanks @oksas
Now it is working.
`//getting data here var dataObject = buildBOXChartData(data);
//Converting object to array dataObject = [dataObject];`
I'm trying to make a chart with AngularJS and NVD3. But I keep getting an error.
Here's
index.html
:Here's
app.js
"Here's what I paste into the
textarea
tag.When I paste that into the
textarea
, then click the "Update chart"button
, this error appears in my browser's console.The error does not refernce my script,
app.js
. What in my code causes this error? How do I fix it?