hover_color only works for the last GlyphRenderer
See original GitHub issueALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
Bokeh 0.12.13, Python 3.5, notebook 5.2.1, windows 10, Chrome
Complete, minimal, self-contained example code that reproduces the issue
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure
from bokeh.io import show, output_notebook
output_notebook()
source = ColumnDataSource(data=dict(x=[1, 2, 3], y0=[1, 2, 3], y1=[-1, -2, -3]))
fig = figure(tools="hover", plot_width=500, plot_height=300, title=None)
c1 = fig.circle('x', 'y0', size=10, hover_color="firebrick", source=source)
c2 = fig.circle('x', 'y1', size=10, hover_color="firebrick", source=source)
show(fig)
Screenshots or screencasts of the bug in action
when mouse is over c1:
when mouse is over c2:
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Bokeh linked scatter charts with CDSView source data
The issue is that the hover color (gold) which identifies data points across the two charts (linked brushing) only works for the last...
Read more >Bokeh linked scatter charts with CDSView source data
The issue is that the hover color (gold) which identifies data points across the two charts (linked brushing) only works for the last...
Read more >CSS Button Style – Hover, Color, and Background
In this article you'll see how to style a button using CSS. My goal here is mostly to showcase how different CSS rules...
Read more >Python Bar.select Examples - Python Code Examples - HotExamples
I would rather have the plots work all the time but really slow # then have ... in barchart.select(GlyphRenderer): if renderer.data_source.data['height'] !=
Read more >Solved: How to change hover color on button
I've played with the hover function... but whenever I use it, it only changes the color of the text. Any suggestions? Thank you,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue is caused by the hover tool overwriting a data source’s
inspected
property each time a renderer is hit test against. I think the solution would be to haveinspected
be a dict of selections with renderers are keys instead of a single selection. (EDIT [March 11, 2018]: I no longer think this.inspected
can be a single selection with the same semantics asselected
. There is a single inspection for a whole data source. If a point is hovered and the inspection is set, then all data in that row is “inspected”.)@ruoyu0088, as a workaround, you can use different sources for each of the renderers:
I have recently come across this issue as well as I am working with dashboards which slice data contained in one big pandas data frame, and have been invited to comment on this thread - see details of my experience here:
https://discourse.bokeh.org/t/bokeh-linked-scatter-charts-with-cdsview-source-data-hover-color-only-works-on-the-last-glyph-in-figure/7603
Please let us know as and when a fix for this is in the pipeline. Many thanks