Can not capture mouseover event while dragging on an svg - d3.js

What I need is to highlight one circle when Im dragging an arrow over it.
While dragging this are the color of the circles:
circles now
What I need is stg like this:
Target Node highlighted
I tried with d3js mouseover event on the circle, but is not being fired while dragging, and also tried with css rule ( :hover) over the circle with the same results.
Any ideas?
Thanks

Check this out:
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/pointer-events
If you set the pointer-events parameter of your element you drag to none, then the other elements you hover onto, will trigger the mouseover event.
And when you finish the drag, set the parameter to auto.

Related

Recharts keep tooltip on screen

The task is to keep the tooltip visible on screen upon clicking on chart dot like this
Right now my tooltips disappear when moving mouse, is there any way to achieve this?

Mouse hover event with Locomotive horizontal scroll

I use LocoScroll to achieve a horizontal scroll.
On my page I also have a mouseover event that i used to show images.
The problem is that my images doesn't change on scroll, and i want to see the images shift as the user scroll through the page. I tried to insert my mouseover function inside locoScroll.on('scroll', (instance) => {}); But it don't seems to be the right direction.
You can find my code here :
https://codepen.io/acds/pen/MWrNeZQ

How can I add an onmouseover event to a line?

Using c3.js, I have a line graph with many lines. The tooltip properly appears at individual data points, and I can use the mouseover property to fire on data point hover.
I need to change the color of a line on the graph on mouseover at any position of the line. It appears as though lines are obscured from hover events by other shapes as I can't even get pain JS or CSS to fire events. Is there any way to get c3.js to fire an event when the mouse moves over and out of a line?
It's a default js function method calling:
onmouseover: function () { ... }

D3 forcelayout label overlap with link

I would like to display tooltip when hover a link
But sometimes the text of label of node got in the way--> no longer the mouse focus in hovering link.
Is there any way to completely ignore the label and let the link hovering happens as expected? Just like the label is not there (still display) anymore

d3 pie chart with link in tooltip

I have a d3 pie chart that displays a tooltip on hover. I need to have a link in the tooltip box, but the box disappears once the cursor leaves the pie chart. How can i modify the mouseover/mouseout function to stay open when the cursor is inside?
.on('mouseover', function (d) {
$("#tooltip")
.html(d.data.label)
.stop(true).fadeTo(800, 1);
})
.on('mouseout', function (d) {
$("#tooltip").fadeOut(900, 0);
});
here is my fiddle
That's tricky. Normally, you just set pointer-events:none; on the tooltip in CSS, so that it doesn't block the mouse events from getting to the element below. But if you do that, then your link won't work!
I'm assuming that your eventual intention is to have the tooltip display over top of or immediately adjacent to the pie chart. If so, this answer is relevant for getting your positioning right.
One option would be to the add mouseover/mouseout functions to the tooltip as well, so that a mouseover on the tooltip triggers it's own visibility, and mouseout starts the transitions for it to fade away -- but only if that mouse doesn't immediately trigger a mouseover fading it back in again!
I'm not an expert on JQuery, but if their transitions work the same as D3 transitions, then the "fade in" transition as you move from SVG to tooltip should cancel out the just-started "fade out" transition so the user doesn't notice. Just make sure the transition or delay on the fade out is reasonably long for the user to move from one element to the other.
If you want the pop-up to be in the corner, I don't see how you can do that and also have it fade out after the mouse moves off the pie chart. Not without driving your users crazy, anyway.

Resources