{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/7674","repository_url":"https://api.github.com/repos/bokeh/bokeh","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/7674/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/7674/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/7674/events","html_url":"https://github.com/bokeh/bokeh/pull/7674","id":307461336,"number":7674,"title":"add CustomJSHover for formatting hover tooltip fields","user":{"login":"bryevdv","id":1078448,"avatar_url":"https://avatars3.githubusercontent.com/u/1078448?v=4","gravatar_id":"","url":"https://api.github.com/users/bryevdv","html_url":"https://github.com/bryevdv","followers_url":"https://api.github.com/users/bryevdv/followers","following_url":"https://api.github.com/users/bryevdv/following{/other_user}","gists_url":"https://api.github.com/users/bryevdv/gists{/gist_id}","starred_url":"https://api.github.com/users/bryevdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryevdv/subscriptions","organizations_url":"https://api.github.com/users/bryevdv/orgs","repos_url":"https://api.github.com/users/bryevdv/repos","events_url":"https://api.github.com/users/bryevdv/events{/privacy}","received_events_url":"https://api.github.com/users/bryevdv/received_events","type":"User","site_admin":false},"labels":[{"id":88662516,"url":"https://api.github.com/repos/bokeh/bokeh/labels/status:%20ready","name":"status: ready","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-03-22T00:10:30Z","updated_at":"2018-05-03T17:07:21Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/bokeh/bokeh/pulls/7674","html_url":"https://github.com/bokeh/bokeh/pull/7674","diff_url":"https://github.com/bokeh/bokeh/pull/7674.diff","patch_url":"https://github.com/bokeh/bokeh/pull/7674.patch"},"body":"- [x] issues: fixes #7647\r\n- [x] tests added / passed\r\n- [x] release document entry (if new feature or API change)\r\n\r\nAllows for:\r\n\r\n```\r\ncustom=CustomJSHover(formatter=\"\"\"\r\n    return value + \" CUSTOM STUFF\"\r\n\"\"\")\r\n\r\np.add_tools(HoverTool(\r\n    tooltips=[\r\n        ( 'date',   '@date{%F}'            ),\r\n        ( 'close',  '$@{adj close}{%0.2f}' ), # use @{ } for field names with spaces\r\n        ( 'volume', '@volume{0.00 a}'      ),\r\n    ],\r\n\r\n    formatters={\r\n        'date'      : 'datetime', # use 'datetime' formatter for 'date' field\r\n        'adj close' : custom,   # use 'printf' formatter for 'adj close' field\r\n                                  # use default 'numeral' formatter for other fields\r\n    },\r\n\r\n    # display a tooltip whenever the cursor is vertically in line with a glyph\r\n    mode='vline'\r\n))\r\n```\r\n\r\nYielding:\r\n\r\n<img width=\"522\" alt=\"screen shot 2018-03-21 at 17 03 51\" src=\"https://user-images.githubusercontent.com/1078448/37744108-be2205e2-2d2a-11e8-97cb-0b70cbe1394b.png\">\r\n\r\n\r\nWIP needs cleanup, tests, docs\r\n\r\nI am not completely happy with the location of `CustomJSHover` under `tools` but it's not rally useful outside that context, and we have already used `bokeh.formatters` for tick formatters specifically. Any thoughts or ideas welcome though. "},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/386366835","html_url":"https://github.com/bokeh/bokeh/pull/7674#issuecomment-386366835","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/7674","id":386366835,"user":{"login":"bryevdv","id":1078448,"avatar_url":"https://avatars3.githubusercontent.com/u/1078448?v=4","gravatar_id":"","url":"https://api.github.com/users/bryevdv","html_url":"https://github.com/bryevdv","followers_url":"https://api.github.com/users/bryevdv/followers","following_url":"https://api.github.com/users/bryevdv/following{/other_user}","gists_url":"https://api.github.com/users/bryevdv/gists{/gist_id}","starred_url":"https://api.github.com/users/bryevdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryevdv/subscriptions","organizations_url":"https://api.github.com/users/bryevdv/orgs","repos_url":"https://api.github.com/users/bryevdv/repos","events_url":"https://api.github.com/users/bryevdv/events{/privacy}","received_events_url":"https://api.github.com/users/bryevdv/received_events","type":"User","site_admin":false},"created_at":"2018-05-03T17:07:21Z","updated_at":"2018-05-03T17:07:21Z","author_association":"OWNER","body":"@philippjfr any feedback? I'd like to merge this soon and get a dev build out"}}
{"actor":{"display_login":"bryevdv"}}