Triggering a re-draw of all models

Hi,

I am developing an app using bokeh serve which includes plots where the size of the plot is dependent on the number of entries in a chosen data set.

The app includes a drop-down for choosing which dataset should be displayed. When the dataset is chosen, I would like to completely re-generate the document so that I can update the dimensions of certain plots to best fit the data.

I have tried using curdoc().clear() followed by regenerating the page elements, but when I do this, the original models remain on the page in the browser (but are no longer responsive) and the new models are appended below them.

I there a simple method to ‘reload’ the current page/document programmatically?

Thanks!