Skip to content

[BUG] Issue with line rendering when selecting indices #11661

@LukazTrisauskas

Description

@LukazTrisauskas

Description of expected behavior and the observed behavior

This is my first time raising an issue on a public repo. So, if I make any mistakes, I apologise in advance.

The selected area in the plot gets disconnected from the entire plot line, the start of unselected line and end of unselected line joins together.

This happens, only when circle glyphs are added to the plot

Before
before
After
after

from bokeh.plotting import figure, output_file, show
from bokeh.models import ColumnDataSource, BoxSelectTool, ResetTool
import numpy as np

output_file("example.html")

sample_data = np.random.rand(20)

source = ColumnDataSource(
    data=dict(x=np.arange(0, len(sample_data)), y=sample_data)
)
color_brewer = ["#31a354", "#addd8e"]

p = figure(width=1000, height=400, tools="box_select, reset", active_drag="box_select")
p.line(x='x', y='y', source=source, line_width=7, line_color=color_brewer[1])
p.circle(x='x', y='y', source=source, size=7, line_color=color_brewer[0], color=color_brewer[0])

show(p)

Screenshots or screencasts of the bug in action

Animation5
example

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions