DateFormatter doesn't support hours/minutes/seconds?

Am I missing something here or does the DateFormatter for a DataTable widget not support hours/minutes/seconds?

Assuming this is correct, how can I display my hourly timestamps in a DataTable widget? Do I manually convert any date-columns into strings python-side before creating the ColumnDataSource?

Thanks,

Dave

Am I missing something here or does the DateFormatter for a DataTable widget not support hours/minutes/seconds?

http://bokeh.pydata.org/en/dev/docs/reference/models/widgets.tables.html#bokeh.models.widgets.tables.DateFormatter

Correct, DateFormatter only formats dates, not datetimes.

Assuming this is correct, how can I display my hourly timestamps in a DataTable widget? Do I manually convert any date-columns into strings python-side before creating the ColumnDataSource?

That's one option. It would also be possible to create a custom user extension that can format datetimes. [1] This is a slightly more advanced approach, I am happy to point out other examples and answer questions if you'd like to pursue this. There is also a new User's Guide section here:

  http://bokeh.pydata.org/en/latest/docs/user_guide/extensions.html

It would probably make sense for something to eventually go into the core library too, if you happen to be interested in getting involved in OSS contributing, this would make an excellent Pull Request for someone to get started with Bokeh development, and we'd be happy to help with that as well.

Thanks,

Bryan

[1] By making Bokeh extensible it is hoped that the community can lead on important features that are simply beyond the resources of the current core team to address as quickly as might otherwise desired. My goal is to make it possible for users to publish and share their custom extensions (think: Atom plugin manager) so that their value can be magnified.

···

On Jul 5, 2016, at 2:19 AM, [email protected] wrote:

Sometimes I don't recognize email addresses. I should say if you'd like to continue with contributions. :slight_smile:

···

On Jul 5, 2016, at 8:44 AM, Bryan Van de Ven <[email protected]> wrote:

On Jul 5, 2016, at 2:19 AM, [email protected] wrote:

Am I missing something here or does the DateFormatter for a DataTable widget not support hours/minutes/seconds?

http://bokeh.pydata.org/en/dev/docs/reference/models/widgets.tables.html#bokeh.models.widgets.tables.DateFormatter

Correct, DateFormatter only formats dates, not datetimes.

Assuming this is correct, how can I display my hourly timestamps in a DataTable widget? Do I manually convert any date-columns into strings python-side before creating the ColumnDataSource?

That's one option. It would also be possible to create a custom user extension that can format datetimes. [1] This is a slightly more advanced approach, I am happy to point out other examples and answer questions if you'd like to pursue this. There is also a new User's Guide section here:

  http://bokeh.pydata.org/en/latest/docs/user_guide/extensions.html

It would probably make sense for something to eventually go into the core library too, if you happen to be interested in getting involved in OSS contributing, this would make an excellent Pull Request for someone to get started with Bokeh development, and we'd be happy to help with that as well.

Thanks,

Bryan

[1] By making Bokeh extensible it is hoped that the community can lead on important features that are simply beyond the resources of the current core team to address as quickly as might otherwise desired. My goal is to make it possible for users to publish and share their custom extensions (think: Atom plugin manager) so that their value can be magnified.