Black Lives Matter. Please consider donating to Black Girls Code today.
Learn about the upcoming Dash Enterprise 4.0 release in the August 5th webinar with Chris Parmer, the Inventor of Dash.

Default tickformatstops

Hello,

The default tickformatstops (I use python API and do not set any tickformatstops) for numerical values works very well for me most of the time. But in some rare cases I would like to format differently, so I need to write my own custom tickformatstops.

What is the tickformatstops that is used by default ? So I can modify it slightly as I need and not have to rewrite the whole thing.

Apologies if this was asked already or if this is easy to find in the code. I dug around but I’m not familiar with js and did not find anything.

Thanks!
Amaury

1 Like

I’m in the same situation. Need to tweak the default value of tickformatstops for a datetime axis, but couldn’t find it, even in the sources. Since this page is the first result for the related google query and doesn’t include a solution yet, bumping it.

I can assume that the tick label formatting for the axis layout object without tickformatstops is handled independently of tickformatstops logic (the value of ax.tickformat is taken, which has the seemingly magic "" default). So, perhaps, achieving the desired isn’t going to be that easy.

For now, I’m going to try to mimic the default behaviour for the datetime axis using the tickformatstops.
upd: Not sure how to get different tickformat for “major” ticks, abandoning the idea:

If someone has better solutions to offer, please do reply.