D3 - Removing elements (div) on update
问题 I currently have a chart with 2 viewing options (regular data and percentages). I also have a tooltip that shows the results for each line that I'm showing When I switch options I want my tooltip to keep showing the info (the lines are getting drawn correctly) but instead what I'm seeing is that I'm creating several tooltip boxes for each time I switch options. My tooltip is an append('g') to my main chart and I'm appending my tooltip box to this tooltip which is appended to my chart which is