我正在为我的项目使用NVD3库,并且我已经编写了以下代码。NVD3 TooltipContent不起作用
var chart = nv.models.lineChart()
.useInteractiveGuideline(true)
.margin({top: 50, right: 50, bottom: 50, left: 50})
.tooltipContent(function (key, y, e, graph) {
console.log("helo");
return "hello";
});
预期的输出应该是在鼠标显示打招呼。 但我不明白,而是我得到了默认的工具提示。
请让我知道我正在做的错误。
[nvd3饼图的可能重复。 js - 如何编辑工具提示?](http://stackoverflow.com/questions/12416508/nvd3-piechart-js-how-to-edit-the-t ooltip) – shabeer90 2014-10-20 11:09:49
我现在把它弄了.useInteractiveGuideline(true)是不正确的。它应该是.useInteractiveGuideline(false)。由于定制工具提示不能与用户2612936建议的“useInteractiveGuideline”一起存在,请访问http://stackoverflow.com/questions/12416508/nvd3-piechart-js-how-to-edit-the-tooltip – 2014-10-21 08:08:55
感谢shabeer90引导到正确的帖子。 – 2014-10-21 08:09:44