Title: when plotting with vbar on an xaxis that's a datetime axis, how can I set the width of the bars to be "one day"?
Tags: python;bokeh
Question: This certainly makes the width of the bars wider, but would be better to set them to "1 day" wide:

```source = ColumnDataSource(df)
p = figure(x_axis_type="datetime", height=200, ...)
...
c.vbar('dt', top='pct_change', width=100000000, source=source)
```


Here is the accepted answer: You can give a ```timedelta``` object as the width keyword argument, it will be converted to milliseconds.

```import datetime

...

c.vbar('dt', top='pct_change', width=datetime.timedelta(days=1), source=source)
```

```NumberSpec``` can accept ```datetime``` values, unless ```accept_datetime``` is set to ```false```.

Comment for this answer: Any reason for downvoting? I would be interseted to know.
Comment for this answer: Me too, this had not occurred to me, but seems perfectly reasonable.

Here is another answer: The underlying units of a datetime axis are milliseconds-since-epoch, so to make a bar be "1 day" wide, set the width to be the number of milliseconds a day, i.e. 24*60*60*1000 = 86400000


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2018:00:05/08/18', 'FavoriteCount': 2.0, 'PostTypeId': 1, 'Tags': '<python><bokeh>', 'Title': 'when plotting with vbar on an xaxis that\'s a datetime axis, how can I set the width of the bars to be "one day"?', 'ViewCount': 612, 'id': 50237911, 'user_AboutMe': '', 'user_AccountId': 75368.0, 'user_DisplayName': 'Chris Withers', 'user_Reputation': 10172.0, 'user_Views': 1162.0, 'user_id': 216229.0}}