Initial Plot Rendering on Local Server

Hello,
I was unable to find a similar issue on here and thought it was worthwhile to create my own post.

I am using bokeh for the first time, and am playing around with some energy data I have for an Alaskan Community.

I wanted to make my plot interactive and added a Select and Slider widget to change the y-variable and displayed years.
When running my script I do not have any errors, but when the plot is initially rendered on the server, All the data is contained within a tiny space in the top left corner of the screen. Only once I click an option on the select tool does the plot fully render and become visible.
I am honestly not sure in the slightest what the issue could be.

Update: While doing some tinkering I realized it was the plot with the initial values that was not rendering. After placing all the code with the initial source data, plot range values, and titles BEFORE the slider, drop-down and update_plot class, the initial plot rendered no problem. It was a simple fix after all.

Impossible to tell anything without a minimal reproducible example.

@ikturchaninov

From the available information, the only shot-in-the-dark guess I can make is that it has to do with a combination of axes type, axes range properties, and the initially chosen data, because you mention working with dates/years.

Dates as Unix values (time since the Unix epoch) for example are large numbers, and if you have a spurious small-valued point thrown in your initial data and/or have manually set an axes min/max limit and/or …

Absent any other information, a recommendation is to scrutinize (1) the data, (2) axes type if explicitly set, and (3) axes ranges if explicitly set.

If that doesn’t explain the behavior, provide a self-contained minimal reproducible example per @p-himik.