我正在使用 angularjs-nvd3-directives 创建堆积面积图。现在我的问题是我正在从服务器轮询数百个数据,我需要在 N 个最新数据上显示。我将如何做到这一点?
这是HTML文件
<div ng-controller="GraphController as viewAll">
<nvd3-stacked-area-chart data="viewAll.data"
id="graph" showXAxis="true" showYAxis="true"
showLegend="true" interactive="true"
tooltips="true" forcex="[xFunction()]">
<svg></svg> </nvd3-stacked-area-chart> </div>