Can you style the days and months of a gantt chart

0 votes
asked 4 days ago in Question / help by Dan
I am looking to style the days and the months for my gantt chart. They look a little rough and I would like to make them a little more professional. I don't see anywhere that this is possible and it seems like something others would have requested before.

1 Answer

0 votes
answered 3 days ago by plantuml (250,820 points)

I must say that we are out of inspiration here about <style> name.

Anyway, we've built a new beta http://beta.plantuml.net/plantuml.jar that add background change for timeline.

Here is an example of what you can get:

@startuml
<style>
ganttDiagram {
    task {
        FontName Helvetica
        FontColor red
        FontSize 18
        FontStyle bold
        BackGroundColor GreenYellow
        LineColor blue
    }
    milestone {
        FontColor blue
        FontSize 25
        FontStyle italic
        BackGroundColor yellow
        LineColor red
    }
    note {
        FontColor DarkGreen
        FontSize 10
        LineColor OrangeRed
    }
    arrow {
        FontName Helvetica
        FontColor red
        FontSize 18
        FontStyle bold
        BackGroundColor GreenYellow
        LineColor blue
        LineStyle 8.0;13.0
        LineThickness 3.0
    }
    separator {
        BackgroundColor lightGreen
        LineStyle 8.0;3.0
        LineColor red
        LineThickness 1.0
        FontSize 16
        FontStyle bold
        FontColor purple
        Margin 5
        Padding 20
    }
    timeline {
        BackgroundColor Bisque
    }
}
</style>
Project starts the 2020-12-01

[Task1] lasts 20 days
sunday are closed

note bottom
  memo1 ...
  memo2 ...
  explanations1 ...
  explanations2 ...
end note

[Task2] lasts 40 days
[Task2] starts 10 days after [Task1]'s end
-- Separator title --
[M1] happens on 5 days after [Task1]'s end

<style>
    separator {
        LineColor black
        Margin 0
        Padding 0
    }
</style>

-- end --

@enduml


Syntax for background was easy.

Since you want to style months, day, weeks, I am not sure about the right option for styles.
Do we have to add "Day", "Month", "Weekday", "Year" ? And don't forget that some days may be closed.
And that you can change the printscale.

It would really help if you could help us to find the right syntax for style.

Thanks !

...