Hello all
I am trying to make a live-updating bar chart with d3 and am having trouble with some of the features I would like to include.
I have added tooltips successfully, but would like the tooltip to update it's y position and displayed value as the rect that it is hovering over changes.
A fiddle is here:
The furthest I have been able to get is to add
d3.select('#tooltip').style('top', function(d){return parseFloat(d3.select('.temp').attr('y') )+ 'px';} )
to the update function, which was at least a result, but obviously is not returning a relevant piece of data.
Any help is much appreciated.
Thanks very much
Ollie