Dtick for date type axis

Hello everyone,

I am stuck with setting the interval between ticks for the axis having type of ‘date’.I want to manually set the time difference between two ticks on the axis.What is the configuration i need to pass in layout option to do so.

Scenario is I have x-axis with date type and i want ticks to be made every 15days.

One more question comes into mind,How I would pass value when time difference is in hours or minutes or second.

If any one could help?

From Single-page reference in JavaScript

For example, to set the interval between ticks to one day, set dtick to 86400000.0. “date” also has special values “M” gives ticks spaced by a number of months. n must be a positive integer. To set ticks on the 15th of every third month, set tick0 to “2000-01-15” and dtick to “M3”. To set ticks every 4 years, set dtick to “M48”

Unfortunately, per-day dtick values are not supported at the moment.

1 Like

What dtick would you use for weekly on Friday? Would that be tick0 set to 2000-01-07 and dtick set to 86400000.0 * 7 = 604800000.0?