Gantt: Weekscale with weeknumbers?

+2 votes
asked Jun 3, 2020 in Wanted features by mawi (500 points)

Hello!

I would very much like to have the weekscale display weeknumbers instead of dates.

So month display is ok in weekscale, but instead of having the week starting date displayed in the week row for each row, display weeknumber. Perhaps (optionally) prefix with "W". 

  • Simple implementation could just set it manually, as you do with "project starts 2020/06/05"; maybe set week start there too, e g "project starts 2020/06/05 week 23" or maybe a separate directive tied to the weekscale directive, "printscale weekly firstweek 23". This is flexible, as it is manual and allows the user to use any of the most common project numbering use cases:
    • Calendar week numbering
    • Week numbering from project start
    • etc
  • More advanced would be to calculate the weeknumber. The problem is then you have to have a setting for the first week (see shot above, for instance).
BR! /marcus
commented Sep 5, 2020 by mawi (500 points)

Here is how it could look (using imgur, somehow image edit thingy is having a bad day):

/mawi

commented Oct 1, 2020 by Serge Wenger Work (13,940 points)
Dear PlantUML team,

Did you think about this feature? One of my customer want a planning with only week numbers.

It is really an issue for me.

Thanks for this great tool
commented Apr 7 by mawi (500 points)

I created a copy of this request as a github issue as well, here:
https://github.com/plantuml/plantuml/issues/525

1 Answer

+1 vote
answered Apr 7 by plantuml (251,240 points)
selected Apr 9 by mawi
 
Best answer

Ok, since many people want this, we have changed the behavior of last beta http://beta.plantuml.net/plantuml.jar

Concerning week number, we follow ISO-8601 rules :

However, you can change the rule :

@startuml
printscale weekly
weeks starts on Sunday and must have at least 1 days

project starts 2021/01/25

[Prototype design] lasts 20 days
[Code prototype] lasts 20 days
[Write tests] lasts 15 days
[Code prototype] starts at [Prototype design]'s end
[Write tests] starts at [Code prototype]'s start
@enduml

Does it sound good ?

commented Apr 8 by mawi (500 points)

Hi! Thanks for this, looks promising!

One question: Does this mean that its now week numbers instead of the week starting date? 

Or does the directive...

weeks starts on Sunday and must have at least 1 days

...toggle weekscale to displaying week numbers instead of the week starting date?

I suspect that both options are of interest, to different people / different situations.

BR! /marcus

commented Apr 8 by plantuml (251,240 points)

One question: Does this mean that its now week numbers instead of the week starting date?

Yes, exactly

I suspect that both options are of interest, to different people / different situations.

We'll see if people complains about it, and we will then add an option :-)

Or does the directive(...)

This directive is really a call to both methods Calendar.setFirstDayOfWeek() and Calendar.setMinimalDaysInFirstWeek() from Java API

...