plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.25k stars 2.05k forks source link

Add custom d3js date format specifier #2938

Closed dagnic closed 1 month ago

dagnic commented 1 month ago

Hi,

I have a figure for which I use a d3js date format specifier among https://d3js.org/d3-time-format#locale_format

fig.update_xaxes(tickformat="%s", hoverformat="%Y-%m-%dT%H:%M:%S.%L")

Here, for the axis, I chose the seconds since UNIX epoch. I would like to use a custom format, e.g. the seconds since a custom epoch.

How can I achieve this? In what file should I define my custom d3js specifier and how to use it within my dash app?

Thanks

gvwilson commented 1 month ago

Thank you for your interest in Dash - for support questions like these, you're more likely to get a timely response in our forum (https://community.plotly.com/). Cheers - @gvwilson