Python Bokeh条形图的时间刻度

Python Bokeh条形图的时间刻度,python,bokeh,Python,Bokeh,我使用以下代码创建了下图中的折线图: p=figure(x_axis_type='datetime') p.line(df.index,df.counter, line_width=2) show(p) data = {"x":df.counter} b = Bar(data, xscale='datetime') show(b) 但是,如果我尝试使用带有以下代码的条形图执行相同操作: p=figure(x_axis_type='datetime') p.line(df.index,df.

我使用以下代码创建了下图中的折线图:

p=figure(x_axis_type='datetime')
p.line(df.index,df.counter, line_width=2)
show(p)
data = {"x":df.counter}
b = Bar(data, xscale='datetime')
show(b)

但是,如果我尝试使用带有以下代码的条形图执行相同操作:

p=figure(x_axis_type='datetime')
p.line(df.index,df.counter, line_width=2)
show(p)
data = {"x":df.counter}
b = Bar(data, xscale='datetime')
show(b)
刻度不正确:

有什么可能的原因吗?能解决吗