text: function floatingTooltip(a,b){function d(){f.style('opacity',0)}function e(g){var h=20,i=10,j=f.style('width'),k=f.style('height'),l=window.scrollY,m=window.scrollX,n=document.all?g.clientX+m:g.pageX,o=document.all?g.clientY+l:g.pageY,p=n-m+2*h+j>window.innerWidth?n-j-2*h:n+h;p<m+h&&(p=m+h);var q=o-l+2*i+k>window.innerHeight?o-k-2*i:o+i;q<l+i&&(q=o+i),f.style('top',q+'px').style('left',p+'px')}var f=d3.select('body').append('div').attr('class','tooltip').attr('id',a).style('pointer-events','none');return b&&f.style('width',b),d(),{showTooltip:function(g,h){f.style('opacity',1).html(g),e(h)},hideTooltip:d,updatePosition:e}}