Reputation: 1
I´m using angularjs-nvd3-directives for display a chart line, but I need to display datasets that have more than one set of values for the same key. For example:
"key": "estimation"
"values": actual: [[x1,a1],[x2,a2]...]
deviation: [[x1,d1],[x2,d2]...]
I have an example in plunker http://plnkr.co/edit/RM0iUx?p=preview but it does not render two lines at the same time.
Is this posible to achieve with nvd3-directives? Has anybody done something similar?
I need the two lines, sets of data values, to be associated with the same key. So when I click on legend corresponding to that key both lines should be affected
Upvotes: 0
Views: 301
Reputation: 273
it's because you have two sets with the same name "set", just change the names to be different from each other and it will be solved.
$scope.exampleData = [
{
"key": "set1",
"values":[[0, 0], [1, 1], [2, 2], [3, 3]]
},
{
"key":"set2",
"values":[[1,0.5],[2,1.5],[2,2.5],[3,2.5]]
}
];
Upvotes: 0