Altair: 12-hour clock

Created on 5 Oct 2018  路  2Comments  路  Source: altair-viz/altair

Is there a way to change the 12-hour clock to a 24-hour clock as seen on the picture?
skaermbillede 2018-10-05 13 35 31

Most helpful comment

In your x channel you could use one of the D3 time formatting strings listed here.

For example

.
.
.
x=alt.X('Date:T', axis=alt.Axis(format='%H'))

All 2 comments

In your x channel you could use one of the D3 time formatting strings listed here.

For example

.
.
.
x=alt.X('Date:T', axis=alt.Axis(format='%H'))

By setting a fixed formatting string you lose the ability to have the tick labels be smart and include dates among the times (as shown in the picture above).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maxgerma picture maxgerma  路  3Comments

fischcheng picture fischcheng  路  4Comments

tonylee3399 picture tonylee3399  路  3Comments

breadbaron picture breadbaron  路  4Comments

pabloinsente picture pabloinsente  路  3Comments