mermaid icon indicating copy to clipboard operation
mermaid copied to clipboard

Add vertical line to gantt plot at specified date

Open wcheek opened this issue 1 year ago • 5 comments

I find that the gantt plot axis is not fine grained enough, particularly when it comes to delineating the start and end of an event. I can't see the specific date when events start and end, I can only guess.

I suppose I have two feature requests regarding this issue:

  1. Add a date marker at the specified date. Maybe it can be marked special somehow from the regular ticked dates, like with a special tick.
  2. Add a vertical line at the specified date. Along with feature 1), this would allow a nice way to mark and specify dates of starts and ends of events.

I'm thinking something like this:

g74

Generated with something like this:

gantt
    title Leave Plan
    dateFormat  YYYY-MM-DD
    axisFormat %b-%d
    section Time off
    Sabbatical start -- 2022-10-03       :milestone, birth, 2022-10-03, 0d
    Time off -- 2 weeks    :first_time_off, 2022-10-03, 2w
    Time off -- 2 weeks    :second_time_off, after work1, 2w
    Time off -- 3 months    :3_months_off1, after work2, 90d
    Time off -- 3 months    :3_months_off2, after work3, 90d

    section Working
    Working -- 2 weeks     :work1, after first_time_off, 2w
    Working -- 2 weeks 		:work2, after second_time_off, 2w
    Working -- 3 months     :work3, after 3_months_off1, 90d

                                       :vert, first_line, after work2
    Nov. 28                      :specify_date, nov_28_date, 2022-11-28
    
                                      :vert, second_line, after work3
    Feb. 26                       :specify_date, feb_26_date, 2023-02-26

I can imagine the need for new keywords, similar to milestone. Here I use vert and specify_date.

wcheek avatar Jul 22 '22 01:07 wcheek

+1
I was looking for the same feature!

matbun avatar Apr 13 '23 14:04 matbun

+1

aliwinter avatar Sep 15 '23 19:09 aliwinter

+1!!

aborruso avatar Sep 28 '23 10:09 aborruso

+1

palashkulsh avatar Mar 21 '24 10:03 palashkulsh