I'm using the "Multichart" with the Angular Nvd3 directive, and I keep getting this error saying:
Error: Invalid value for attribute transform="translate(0,NaN)"
and I have no idea why this happens.
My HTML-code looks like this:
<nvd3 options="options" data="data"></nvd3>
My JavaScript looks like this:
$scope.options = {
chart: {
type: 'multiChart',
height: 450,
margin : {
top: 30,
right: 60,
bottom: 50,
left: 70
},
color: d3.scale.category10().range(),
//useInteractiveGuideline: true,
transitionDuration: 500,
xAxis: {
tickFormat: function(d){
return d3.format(',f')(d);
}
},
yAxis1: {
tickFormat: function(d){
return d3.format(',.1f')(d);
}
},
yAxis2: {
tickFormat: function(d){
return d3.format(',.1f')(d);
}
}
}
};
$scope.data = [
{
key: "Stream0",
originalKey: "Stream0",
type: "area",
yAxis: 1,
seriesIndex: 0,
values: [
{
x:0,
y:1000,
index: 0,
seriesIndex: 0,
series: 0
},
{
x:1,
y:300,
index: 1,
seriesIndex: 0,
series: 0
},
{
x:2,
y:4000,
index: 2,
seriesIndex: 0,
series: 0
},
{
x:3,
y:5000,
index: 3,
seriesIndex: 0,
series: 0
}
]
}
];
Please help me solve this problem, any suggestions would be appreciated.