datetime-smart-offset
lq.tick-format.datetime-smart-offset(ticks, avoid-redundant=true, period="month", year="[year]", month="[year]-[month repr:short]", day="[year]-[month repr:short]-[day]")(source)
Displays an offset for a set of datetime ticks.
Parameters
ticks : array
The ticks as datetime
instances.
avoid-redundant : bool
default: true
Whether to avoid redundant information between ticks and offset.
For example, if the year is already displayed as a datetime.smart-fist
,
it is omitted here.
period : str
default: "month"
The smallest changing period type between consecutive ticks.
year : str
| function
default: "[year]"
How to display years offsets.
month : str
| function
default: "[year]-[month repr:short]"
How to display month offsets.
day : str
| function
default: "[year]-[month repr:short]-[day]"
How to display day offsets.