Я использую пузырьковую диаграмму d3.v4 с svg canvas.Я хочу использовать свойство z-index при наведении мыши на пузырь, я использую следующий код:
d3.selection.prototype.moveToFront = function() {
return this.each(function(){
this.parentNode.appendChild(this);
});
};
d3.selection.prototype.moveToBack = function() {
return this.each(function() {
var firstChild = this.parentNode.firstChild;
if (firstChild) {
this.parentNode.insertBefore(this, firstChild);
}
});
};
Ниже кода в ngOnIt:
.on('mouseover', function(d) {
d3.select(this).moveToFront();
})
Помогите, парни!Заранее спасибо