score:1

Accepted answer

Everything is fine, but you missed adding class to d3.tip() as below

.attr('class', 'd3-tip')

var tip = d3.tip()
  .attr('class', 'd3-tip') // <---- missing this 
  .offset([20, 0])
  .html(function(d) {
    return "<strong>Project:</strong> <span style='color:red'>" + d.name + "</span>";
  });

Related Query