{"action":"created","issue":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/3206","labels_url":"https://api.github.com/repos/bokeh/bokeh/issues/3206/labels{/name}","comments_url":"https://api.github.com/repos/bokeh/bokeh/issues/3206/comments","events_url":"https://api.github.com/repos/bokeh/bokeh/issues/3206/events","html_url":"https://github.com/bokeh/bokeh/pull/3206","id":119332866,"number":3206,"title":"add hover_glyph to specify hover policy","user":{"login":"bryevdv","id":1078448,"avatar_url":"https://avatars.githubusercontent.com/u/1078448?v=3","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":[{"url":"https://api.github.com/repos/bokeh/bokeh/labels/status:%20accepted","name":"status: accepted","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/bokeh/bokeh/milestones/22","html_url":"https://github.com/bokeh/bokeh/milestones/0.11.0","labels_url":"https://api.github.com/repos/bokeh/bokeh/milestones/22/labels","id":1320524,"number":22,"title":"0.11.0","description":"","creator":{"login":"mattpap","id":27475,"avatar_url":"https://avatars.githubusercontent.com/u/27475?v=3","gravatar_id":"","url":"https://api.github.com/users/mattpap","html_url":"https://github.com/mattpap","followers_url":"https://api.github.com/users/mattpap/followers","following_url":"https://api.github.com/users/mattpap/following{/other_user}","gists_url":"https://api.github.com/users/mattpap/gists{/gist_id}","starred_url":"https://api.github.com/users/mattpap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattpap/subscriptions","organizations_url":"https://api.github.com/users/mattpap/orgs","repos_url":"https://api.github.com/users/mattpap/repos","events_url":"https://api.github.com/users/mattpap/events{/privacy}","received_events_url":"https://api.github.com/users/mattpap/received_events","type":"User","site_admin":false},"open_issues":73,"closed_issues":156,"state":"open","created_at":"2015-09-23T15:04:43Z","updated_at":"2015-12-03T17:22:31Z","due_on":"2015-12-07T23:00:00Z","closed_at":null},"comments":18,"created_at":"2015-11-29T03:21:42Z","updated_at":"2015-12-03T17:34:45Z","closed_at":"2015-12-03T17:22:31Z","pull_request":{"url":"https://api.github.com/repos/bokeh/bokeh/pulls/3206","html_url":"https://github.com/bokeh/bokeh/pull/3206","diff_url":"https://github.com/bokeh/bokeh/pull/3206.diff","patch_url":"https://github.com/bokeh/bokeh/pull/3206.patch"},"body":"issues: closes #1476\r\n\r\nThis PR enables styling inspected (hovered) glyphs by specifying a `hover_glyph` property on a `GlyphRenderer` (or as a convenience, using `hover_fill_alpha`, etc. with the `bokeh.plotting` interface). This eliminates the need to write any custom callbacks to do highlighting on hover. \r\n\r\nNote: with this implementation, the hovered glyphs are always rendered ***on top of*** the regular glyphs, not \"instead of\" the regular glyphs. Thus, typically a hover glyph would want to have a high alpha to obscure the glyph below it. \r\n\r\nAn example you can try out below:\r\n```\r\nfrom bokeh.plotting import figure, output_file, show\r\nfrom bokeh.models import ColumnDataSource, Circle, HoverTool\r\nfrom bokeh.sampledata.glucose import data\r\n\r\noutput_file(\"hover.html\")\r\n\r\nx, y = data.ix['2010-10-06'].index.to_series(), data.ix['2010-10-06']['glucose']\r\n\r\n# Basic plot setup\r\np = figure(width=600, height=300, x_axis_type=\"datetime\", tools=\"\", toolbar_location=None, title='Hover over points')\r\np.line(x, y, line_dash=\"4 4\", line_width=1, color='gray')\r\n\r\n# Add a circle, that is visible only when selected\r\n# source = ColumnDataSource({'x': x, 'y': y})\r\n# invisible_circle = Circle(x='x', y='y', fill_color='gray', fill_alpha=0.5, line_color=\"white\", size=20)\r\n# visible_circle = Circle(x='x', y='y', fill_color='firebrick', fill_alpha=0.9, line_color=\"blue\", size=20)\r\n# cr = p.add_glyph(source, invisible_circle, hover_glyph=visible_circle)\r\n\r\ncr = p.circle(x, y, fill_color=\"grey\", alpha=0.1, line_color=None, size=20, \r\n              hover_fill_color=\"firebrick\", hover_alpha=0.5, hover_line_color=\"white\")\r\n\r\np.add_tools(HoverTool(tooltips=None, renderers=[cr], mode='hline'))\r\n\r\nshow(p)\r\n```\r\n\r\nThis PR currently WIP, still needed:\r\n* [x] documentation support\r\n* [x] factoring/cleanup\r\n* [x] appropriate tests"},"comment":{"url":"https://api.github.com/repos/bokeh/bokeh/issues/comments/161725461","html_url":"https://github.com/bokeh/bokeh/pull/3206#issuecomment-161725461","issue_url":"https://api.github.com/repos/bokeh/bokeh/issues/3206","id":161725461,"user":{"login":"bryevdv","id":1078448,"avatar_url":"https://avatars.githubusercontent.com/u/1078448?v=3","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":"2015-12-03T17:34:45Z","updated_at":"2015-12-03T17:34:45Z","body":"@birdsarah great I've started a branch to play around with some optimizations, I'll push some smaller individual PRs later. "}}