Hi, in my interactive interface based on CustomJS, i need to add and delete glyphs. I found the way to add glyph. But can’t solve, how do remove it, when it is needed. Please help me how glyphs should be deleted. Here is part of code for adding to layout new Glyph:
if (p.renderers[j].name === select_cur_obj.value[i]) { var new_source = new Bokeh.ColumnDataSource({ data: p.renderers[j].data_source.data }); var new_line = new Bokeh.Line({ x: { field: "PERIOD_START_TIME" }, y: { field: cb_obj.value }, line_color: pallete[i], line_width: 3, name: new_name }); break; }; } p.add_glyph(new_line, new_source, {'name': new_name}); } p.change.emit();


