如何在工具提示中注入数据

时间:2014-05-23 01:07:09

标签: d3.js angularjs-directive nvd3.js

我正在使用angularjs-nvd3-directives来渲染我的图表。我在图表上有一个问题,我有2个系列,其中一个系列已使用chart.lines.interactive(false)禁用了工具提示,另一个系列启用了它。

我想在剩余的工具提示中显示其他系列以及当前系列的值。有点像这样:http://nvd3.org/examples/cumulativeLine.html

使用angularjs-nvd3-directives,您必须指定将呈现工具提示的tooltipContent函数。该函数有5个参数:

$scope.toolTipContentFunction = function() {
    return function(key, x, y, e, graph) {
        ...
    }
}

graphchart返回的nvd3函数。我试图从中获取数据,但我找不到任何方法来获取它。

我怎么能这样做?

马克西姆

0 个答案:

没有答案
相关问题