2016-08-16 32 views
0

我使用angular-nvd3創建散點圖(例如http://krispo.github.io/angular-nvd3/#/scatterChart)。我可以使用下面的函數然而在angular-nvd3工具提示中添加更多字段

tooltip: { 
    contentGenerator: function(d) { return '<h3>HELLO WORLD</h3>'; } 
} 

我的要求是更基本的創建自定義提示,並通過nvd3生成的默認提示添加幾個附加字段(如果不爲null)。

是否可以將圖形的數據對象中的textvalue屬性映射到默認的nvd3 toolip?

{ 
x: 1460199045.987, 
y: 0, 
textvalue: "117 test comment" 
}, 

回答