{"action":"created","issue":{"url":"https://api.github.com/repos/novus/nvd3/issues/1190","labels_url":"https://api.github.com/repos/novus/nvd3/issues/1190/labels{/name}","comments_url":"https://api.github.com/repos/novus/nvd3/issues/1190/comments","events_url":"https://api.github.com/repos/novus/nvd3/issues/1190/events","html_url":"https://github.com/novus/nvd3/pull/1190","id":99704011,"number":1190,"title":"Refactor tooltip code","user":{"login":"RenatoUtsch","id":836333,"avatar_url":"https://avatars.githubusercontent.com/u/836333?v=3","gravatar_id":"","url":"https://api.github.com/users/RenatoUtsch","html_url":"https://github.com/RenatoUtsch","followers_url":"https://api.github.com/users/RenatoUtsch/followers","following_url":"https://api.github.com/users/RenatoUtsch/following{/other_user}","gists_url":"https://api.github.com/users/RenatoUtsch/gists{/gist_id}","starred_url":"https://api.github.com/users/RenatoUtsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RenatoUtsch/subscriptions","organizations_url":"https://api.github.com/users/RenatoUtsch/orgs","repos_url":"https://api.github.com/users/RenatoUtsch/repos","events_url":"https://api.github.com/users/RenatoUtsch/events{/privacy}","received_events_url":"https://api.github.com/users/RenatoUtsch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-07T18:33:15Z","updated_at":"2015-08-10T15:39:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/novus/nvd3/pulls/1190","html_url":"https://github.com/novus/nvd3/pull/1190","diff_url":"https://github.com/novus/nvd3/pull/1190.diff","patch_url":"https://github.com/novus/nvd3/pull/1190.patch"},"body":"This commit is an entire refactor of the tooltip code, with emphasis on the tooltip positioning.\r\n\r\nThe tooltip positioning has been wrong for a long time, I even submitted two .html files that show bugs in the tooltip positioning in the older versions (test/scrollTest.html and test/scrollTest2.html). I rewrote all the code to fix these positioning bugs and remove that ugly broken code that is used for the interactive guideline tooltip. I fixed a TODO from the tooltip code also.\r\n\r\nThe tooltip behaviour when being displayed didn't change, the position and gravity are still the same. I fixed a bug that happens when the tooltip goes up and gets outside the viewport. Now it is staying correctly in the viewport.\r\n\r\nAlthough the tooltip behaviour is the same, this __is__ a (small) breaking change for the API, so it may be a good idea to bump the minor version when releasing a new tag. Because this already is a breaking change,  I removed the deprecated tooltip functions, as this will need a new minor version (1.9).\r\n\r\nHere are the breaking changes:\r\n- Removed the offset attribute: it just doesn't make sense to me. Why always subtract this offset, without minding the gravity?\r\n- Removed the fixedTop attribute: why the fuck would I fix the tooltip on the top of the page and make it disappear when scrolling?\r\n- Removed the original position attribute: now it is a function that returns where to position the tooltip. This function can be overridden if you want and, by default, returns the current mouse position. Because of this, the charts do not need to specify the position directly anymore, this is done inside the tooltip code. However, if they want to actually change the position to one different from the mouse position, that can be easily done, it just needs to override the position() function and return the object that was commented in the code.\r\n\r\nThis pull request is quite big, but it fixes a lot of bugs and cleans up the code and API.\r\nThis fixes #1138 (also #1124, although it is already fixed)."},"comment":{"url":"https://api.github.com/repos/novus/nvd3/issues/comments/129499177","html_url":"https://github.com/novus/nvd3/pull/1190#issuecomment-129499177","issue_url":"https://api.github.com/repos/novus/nvd3/issues/1190","id":129499177,"user":{"login":"liquidpele","id":1065913,"avatar_url":"https://avatars.githubusercontent.com/u/1065913?v=3","gravatar_id":"","url":"https://api.github.com/users/liquidpele","html_url":"https://github.com/liquidpele","followers_url":"https://api.github.com/users/liquidpele/followers","following_url":"https://api.github.com/users/liquidpele/following{/other_user}","gists_url":"https://api.github.com/users/liquidpele/gists{/gist_id}","starred_url":"https://api.github.com/users/liquidpele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liquidpele/subscriptions","organizations_url":"https://api.github.com/users/liquidpele/orgs","repos_url":"https://api.github.com/users/liquidpele/repos","events_url":"https://api.github.com/users/liquidpele/events{/privacy}","received_events_url":"https://api.github.com/users/liquidpele/received_events","type":"User","site_admin":false},"created_at":"2015-08-10T15:39:00Z","updated_at":"2015-08-10T15:39:00Z","body":"Yea, I removed the small tooltips that showed up on the axis in the scatter plot, and robin was also in support of it.  It really didn't fit a tooltip model well and was kind of hacked in for... I have no idea why really since the same data shows in the tooltip itself. "}}