Open JenniferShelton opened 6 years ago
I think a general solution to #8023 would also solve this but I'm not completely sure so will not close this as a dupe just yet.
I think I've observed a similar but perhaps unrelated issue (no minimal example yet, sorry) where I've got a MultiSelect piped into a CustomJSFilter piped into a CDSView that filters on the column used as the legend_group
(in a p.circle()). In practice, I'm observing the un-selected legend groups show up with strange fill and outline colors in the legend.
Another occurrence of this I believe:
https://discourse.bokeh.org/t/update-glyph-color-from-datatable/5426/2
Selection issue was fixed in PR #10041. The legend is still broken.
ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
bokeh 0.12.16 python 3.6.5 notebook 5.5.0 OSX 10.11.6 browser safari or chrome pandas 0.23.0
Description of expected behavior and the observed behavior
Here is a small dataset: x_values y_values fruit animal 1 1 apple cat 2 0 pear cat 3 1 apple dog 4 0 apple bird 5 1 kiwi cat
I would expect that if I view a subset of the data using CDSView the legend will still match the colors to the unique list of factors. I would also expect that if a plot like plot B (created from a CDSView) was filtered using the box_select tool in plot A the color mapping would adjust and still reflect the correct color.
In the example below the legend is only correct when the data is not a CDSView subset of the full ColumnDataSource. The legend is only correct in plots A and C.
Also in the example below if I use box select on figure A then the color mapping shifts in figure B.
Complete, minimal, self-contained example code that reproduces the issue
Stack traceback and/or browser JavaScript console output
Screenshots or screencasts of the bug in action