Black Lives Matter. Please consider donating to Black Girls Code today.

Timestamps formatting

Hello all,
is it possible to visualize x axis values using a different format? I tried to assign to Plotly.d3.timeFormat a different time formatting function, but without luck so far. The function I’m passing is based on this page: https://github.com/d3/d3-time-format
Any help would be much appreciated.

Thanks

I think you’re looking for https://plot.ly/javascript/reference/#layout-xaxis-tickformat

tried to assign to Plotly.d3.timeFormat a different time formatting function

Yeah, that won’t work. We do use d3 internally, but not exclusively.

Thanks. Exactly what I needed.

1 Like