score:1

Accepted answer

I played around with your jsfiddle link a bit and came up with a solution.

If you replace your tooltip variable code with

var tip = d3.tip()          
  .attr('class', 'd3-tip')
  .offset([-10, 0])
  .html(function(d) {
    return d.name +  
    "<br><span class='tipTitle'>Location:</span>" + " " + d.location + 
    "<br><span class='tipTitle'>Floruit Date:</span>" + " " + d.floruitDate +
    "<br><span class='tipTitle'>Biography:</span>" + " " + (d.biography ? d.biography : "There is no listed biography for " + d.name) + 
    '<br>Click through for more information.';
});

you can get rid of the bioBackup function entirely and it works fine.


Related Query

More Query from same tag