I am trying to make a hbar in which the vetrical axis (y_axis) is a datetime.
The following does not work:
from bokeh.sampledata.stocks import AAPL
AAPL[‘date’] = to_datetime(AAPL[‘date’])
ko = figure(y_axis_type=“datetime”)
ko.hbar(y=AAPL[‘date’], right=AAPL[‘open’], height=1006060*24, color=“lightgrey”)
ko.line(y=AAPL[‘date’], x=AAPL[‘open’], color=“grey”)
show(ko)
What puzzeles me is that it works if I remove the hbar line:
ok = figure(y_axis_type=“datetime”)
ko.line(AAPL[‘open’], AAPL[‘date’], color=“grey”)
show(ok)
Or when I change the x/y axis:
ok = figure(x_axis_type=“datetime”)
ok.vbar(AAPL[‘date’], top=AAPL[‘open’], width=1006060*24, color=“lightgrey”)
show(ok)
Is there a subtle way to count the datetime in nanoseconds in that case?