chinmaymk / angular-charts

angular directives for creating common charts using d3
MIT License
1.03k stars 270 forks source link

Tooltip not following the mouse #57

Closed chinmaymk closed 10 years ago

chinmaymk commented 10 years ago

Seems like an side effect of removing jquery

soyuka commented 10 years ago

Hmm I do not have this effect on the example file.

Do you have a way to reproduce?

chinmaymk commented 10 years ago

It's working on demo page. But not on plunkr. A guy tweeted this bug. Haven't confirmed yet. Will check tom and close if invalid.

soyuka commented 10 years ago

Ok, also http://chinmaymk.github.io/angular-charts/ (gh-pages) is not up to date.

felipeleusin commented 10 years ago

Going to add a update to gh-pages to my #55

chinmaymk commented 10 years ago

@felipeleusin better add a raw reference to script from bower branch, so we don't have to update it everytime.

https://rawgit.com/chinmaymk/angular-charts/bower/dist/angular-charts.min.js

It seems jQlite is not updating the location, events are getting passed correctly.

https://github.com/chinmaymk/angular-charts/blob/master/src/angular-charts.js#L901

soyuka commented 10 years ago

+1 for the raw reference, but there are less dependencies anyway (:

weird, maybe that within Plunkr the event.x is not been handled properly? Could you link to that plunkr example? Thx.

chinmaymk commented 10 years ago

Unlikely that to be the case, here's the link to plunkr, put a debug point at updateToolTip method and check.

http://plnkr.co/edit/T9J7bz?p=preview

felipeleusin commented 10 years ago

i'll look into it today

On Thu, May 15, 2014 at 5:42 AM, Chinmay Kulkarni notifications@github.comwrote:

Unlikely that to be the case, here's the link to plunkr, put a debug point at updateToolTip method and check.

http://plnkr.co/edit/T9J7bz?p=preview

— Reply to this email directly or view it on GitHubhttps://github.com/chinmaymk/angular-charts/issues/57#issuecomment-43182625 .

soyuka commented 10 years ago

http://plnkr.co/edit/JgZtwz?p=preview fixed was really weird

wim82 commented 10 years ago

hey, it was me who tweeted about it. i'm still quite new to angular & jquery, but what i noticed was: tooltip was not following the mouse in my simple local implementation, even though i saw it working on the demo page, and then i saw it didn't work on the plunkr. upon inspecting the dependencies, i saw the demo page loaded jquery whereas the plunker does not. once i added jquery to my local project, the tooltip started to follow the mouse as well.

but glad that it is fixed now!

soyuka commented 10 years ago

Yeah demo is not up to date atm, we're working on it.

The weird thing is that event.clientX is an integer but that element.css() wasn't handling it properly (angularjs issue?) but by transforming it to a '10px' string it did the trick.