visjs / vis-timeline

📅 Create a fully customizable, interactive timelines and 2d-graphs with items and ranges.
https://visjs.github.io/vis-timeline/
Other
1.74k stars 302 forks source link

Vis-timeline additional labels of date format on the time axis #1780

Open walerun opened 3 months ago

walerun commented 3 months ago

Hi, it would be nice if vis-timeline could support additional scales in date format config. For example, currently, you can set minorLabels as:

minorLabels: {
    millisecond:'SSS',
    second:     's',
    minute:     'HH:mm',
    hour:       'HH:mm',
    weekday:    'ddd D',
    day:        'D',
    week:       'w',
    month:      'MMM',
    year:       'YYYY'
  }

However, I can not handle a week. If you try to scale the timeline it does not appear at all nor do you configure it with an object or function. Another case is I want to handle a quarter interval. And there is no such option in config.