I am running into the same issue documented in
https://stackoverflow.com/questions/52463431/how-to-change-display-format-of-time-in-seconds-to-date-in-x-axis-in-bokeh-chart
I would like to display the full date on every x axis ticker, (e.g. 10/10/2021 14:51:13),
However, when the range of the graph I use is too small (my x axis spans approximately 30 seconds worth of data), it does not render the full date, only the seconds.
I am using the datetimetickformatter, which does not remedy the issue.
plot.xaxis.formatter = DatetimeTickFormatter(days="%d-%b-%Y", hours="%H:%M", seconds="%S")
I would like to know if this is even possible to fully format the x axis to show the entire date. If not, is there a way I can display the missing date information on the graph separately in a single location?
For context, I am using a bokeh server with a callback that is streaming new data to the plot. So the issue I am running into with a new method I am trying, is I am putting a text glyph with the missing date information on the plot at the newest x,y coordinates. However, this makes the plot messy because the text glyph jumps around when new data is streamed. I have also tried this using a LabelSet but have the same issue. Is there a way to mount a glyph to a specific location, maybe outside the plot, so it is not dependent on the streaming x,y coordinates, but also update the data with a columndatasource object? Or is there another way to accomplish this? I need some way to display the current date and time on the plot so there is context for what day, hour, and minute it is since the plot only shows seconds.
text_source = ColumnDataSource(df)
glyph = Text(x="Time", y="y", text="Time")
plot.add_glyph(text_source, glyph)
def callback():
text_source.data = ColumnDataSource.from_df(new_df)