2015-04-17 62 views
0

我使用nvd3-line-chart angularjs指令。 我的数据是:angularjs nvd3-line-chart设置y2轴

$scope.exampleData = [ 
    { 
     "key": "Series 1", 
     "values": [ [1, 2], [2, 10], [3, 6], [4, 15], [5, 8] ] 
    }, 
    { 
     "key": "Series 2", 
     "values": [ [1, 5], [2, 30], [3, 8], [4, 11], [5, 4] ] 
    }, 
    { 
     "key": "Series 3", 
     "values": [ [1, 2000], [2, 10000], [3, 600], [4, 1500], [5, 8000] ] 
    } 
] 

HTML:

nvd3-line-chart(
    data="exampleData" 
    id="graph-Data-1" 
    width="1170" 
    height="494" 
    showXAxis="true" 
    showYAxis="true" 
    tooltips="true" 
    useInteractiveGuideline="true" 
    showLegend="true" 
    ng-if="exampleData" 
) 

我如何分配Y2系列到3个数据?我发现line-plus-bar-chart指令,但我怎么能通过nvd3-line-chart指令实现这个?

回答