Embeded chart to replace not append

Hi,
chart are stacking on top of each other every time the function add new chart in the HTML
even though i remove the Div elemnt by

 div.remove()
div.inerHTML = ''

and create new div before loading the new chart
any ideas on how to solve this ?

item = JSON.parse(item_text);
Bokeh.embed.embed_item(item, "myplot");

It’s not really possible to speculate with so little information. It is always advised to provide a complete Minimal Reproducible Example that can actually be investigated directly.

@pydspro That is not a Minimal Reproducible Example. An MRE is something complete and self-contained that another person can take and run directly.