Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Set a duration to show the tip #70

Closed
StefanBrandt opened this issue Aug 20, 2014 · 2 comments
Closed

Set a duration to show the tip #70

StefanBrandt opened this issue Aug 20, 2014 · 2 comments

Comments

@StefanBrandt
Copy link

How we can set a duration to show the tip?
like this

.on("mouseover", function(d) {
div.transition()
.duration(200)
.style("opacity", .9);
div .html(formatTime(d.date) + "
" + d.close)
.style("left", (d3.event.pageX) + "px")
.style("top", (d3.event.pageY - 28) + "px");
})
.on("mouseout", function(d) {
div.transition()
.duration(500)
.style("opacity", 0);
});

@skyl
Copy link

skyl commented Aug 31, 2014

I would like something similar. I tried to hack show and hide to take arguments, duration/delay. However, if the tip is already fading from a hide, for some reason, the show on another element will not bring the opacity back to 1 until the hide transition is over.

@caged
Copy link
Owner

caged commented Oct 21, 2014

You should be able to use css transitions for this. See the examples directory.

@caged caged closed this as completed Oct 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants