Add <style></style> in GANTT

+1 vote
asked Feb 18, 2020 in Wanted features by Pich78 (120 points)

At the moment this beautiful feature is missing in GANTT diagram.

It can be useful and nice, for example

<style>

ganttDiagram {

    BackGroundColor lightCyan

    FontName Consolas

}

</style>

1 Answer

0 votes
answered Aug 21, 2020 by plantuml (294,960 points)

With last beta http://beta.plantuml.net/plantuml.jar, you can now have

@startuml
<style>
ganttDiagram {
    task {
        FontName Helvetica
        FontColor red
        FontSize 18
        FontStyle bold
        BackGroundColor blue
        LineColor yellow
    }
    milestone {
        FontColor blue
        FontSize 25
        FontStyle italic
        BackGroundColor yellow
        LineColor red
    }
}
</style>
[Task] lasts 20 days
[M1] happens on 5 days after [Task]'s end
@enduml

commented Mar 13, 2021 by anonymous

Not all of the style properties are includes. For example:

RoundCorder, Margin, Padding do not work when defining a style

...