Display month & week number without the weekdays

Hi,

How can we achieve the following view using timeline?

In timeline object, I am not being able to hide the weekdays and show only the weeknumbers

Thanks

Hello @Suresh :wave:

Timeline year view with monthly resolution:

  • show a year view with a monthly horizontal resolution, example

  • if it’s needed, you can easily customize the date format in the header (February → Feb-23) with the renderMonth option as shown here

Regarding the second part - showing week numbers (???):

  • I’m curious about the use case so, can you share more information about that? - I’m asking because these couldn’t be week numbers since the different months have different amounts of weeks on them (for example: February '23 has 5 weeks, March '23 - 5 weeks, April '23 - 6 weeks, etc.)

  • so, I assume that those symbolize something else and I would like to understand the context a bit better

Hello @Zsombor,
Thanks for the reply

To get a clear context, when the timeline object is given as

timeline: {
     type: "year",
     weekNumbers: true
}

we get the header as shown in Img 1.

The month, week number and the day is visible as headers.

Suppose I need to view the data week wise, one approach I could go for, is to show a year view with a weekly horizontal resolution

timeline: {
    type: "year",
    resolutionHorizontal: "week",
  }

which displays the header as shown in Img 2.

But my actual use case is to view the calendar week wise, and for better readability show the month on top of it as well. (as shown in Img 3.)

This can be essential for clients, who wish to see their timeline event summary week wise

Thanks for sharing @Suresh!

In this case, I would recommend the second solution that you mentioned: using a year view with weekly horizontal resolution. In this case, you can use the renderWeek option to customize the week header in order to show the month names and under that the week number.