Robert
Robert

Reputation: 481

d3.js: How to update chart with click with mouse scrubber tooltip

I'm working on updating data dynamically with a click while maintaining a mouseover scrubber to highlight (i.e. append) the data to text elements. I am able to get the initial data and scrubber to work based on this helpful tutorial: http://www.d3noob.org/2014/07/my-favourite-tooltip-method-for-line.html.

My next step was to update my data (i.e. paths and axis) based on a button click. I used this tutorial: http://www.d3noob.org/2013/02/update-d3js-data-dynamically-button.html. However, I am only able to update the paths and axis but the mouseover event is till capturing the old data.

Maybe I still haven't fully grasped the idea of enter, update, exit? Anyone know how to update the mouseover scrubber when the path elements update via the mouse click?

Upvotes: 0

Views: 557

Answers (1)

Quarter2Twelve
Quarter2Twelve

Reputation: 613

On D3js's website there are plenty of tutorials that explain very clearly how enter, update,and exit work. Personally I prefer this one.

Hope it helps.

Upvotes: 0

Related Questions