以下适用于 D3.js
http://bl.ocks.org/ilyabo/1373263
$('svg circle').tipsy({
gravity: 'w',
html: true,
title: function() {
var d = this.__data__,
c = colors(d.i);
return 'Hi there! My color is <span style="color:' + c + '">' + c +
'</span>';
}
});
不确定如何使用 angular 2 D3.js 执行此操作,并包含用于弹出窗口的 jQuery Tipsy