enable skinparam for Gantt charts

+8 votes
asked Feb 21, 2018 in Wanted features by Headbonk (120 points)

Just discovered the Gantt chart capability in PlantUML. It has been a lifesaver for a major scheduling project I am working on.

The default output could use some visual love though.

When I try basics like "skinparam DefaultFontName Calibri" in a Gantt chart, I get parse errors.

It would be nice if Gantt charts allowed for at least basic control of the fonts:

skinparam classFontColor red
skinparam classFontSize 10
skinparam classFontName Aapex

It would be nice too if we could have separate control of fonts on the calendar ruler and tasks. My charts end up being very long, and the default font size on tasks makes them hard to read if the diagram is scaled to page width.

2 Answers

0 votes
answered Aug 21, 2020 by plantuml (294,960 points)
selected Mar 18, 2021 by Headbonk
 
Best answer

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 Nov 19, 2020 by anonymous
What about for separators? I found I could change them, but could not discover a style setting which helped. Also, I am curious why this isn't using the Skinparam approach. Are we headed into a different direction?
commented Nov 20, 2020 by The-Lu (63,920 points)

Hello A.,

If that can help,
Regards,
Th.
+1 vote
answered May 10, 2019 by Potherca (430 points)

I would also really like this.

Currently I have to (ab)use the [Creole Syntax](http://plantuml.com/creole) to change font color/sizes:

@startgantt

[<size:14>Prototype design] as [A] lasts 10 days
[= Code prototype] as [B] lasts 10 days
[<color:red><b>Write tests] as [C] lasts 5 days
[B] starts at [A]'s end
[C] starts at [B]'s start

@endgantt

...