This example which works with @startuml doesn't work with @startgantt
@startganttheader<font color=red>Warning:</font>Do not use in production.endheader@endgantt
Error java.lang.ClassCastException: net.sourceforge.plantuml.project.GanttDiagram cannot be cast to net.sourceforge.plantuml.UmlDiagramjava.lang.ClassCastException: net.sourceforge.plantuml.project.GanttDiagram cannot be cast to net.sourceforge.plantuml.UmlDiagram at net.sourceforge.plantuml.command.CommandMultilinesHeader.execute(CommandMultilinesHeader.java:72) at net.sourceforge.plantuml.command.CommandMultilinesHeader.execute(CommandMultilinesHeader.java:47) at net.sourceforge.plantuml.command.ProtectedCommand.execute(ProtectedCommand.java:57) at net.sourceforge.plantuml.AbstractPSystem.executeCommand(AbstractPSystem.java:186) at net.sourceforge.plantuml.command.PSystemCommandFactory.executeFewLines(PSystemCommandFactory.java:125) at net.sourceforge.plantuml.command.PSystemCommandFactory.createSystem(PSystemCommandFactory.java:108) at net.sourceforge.plantuml.PSystemBuilder.createPSystem(PSystemBuilder.java:161) at net.sourceforge.plantuml.BlockUml.getDiagram(BlockUml.java:188) at net.sourceforge.plantuml.picoweb.PicoWebServer.handleGET(PicoWebServer.java:230) at net.sourceforge.plantuml.picoweb.PicoWebServer.run(PicoWebServer.java:126) at java.lang.Thread.run(Unknown Source)You should send a mail to plantuml@gmail.com or post to https://plantuml.com/qa with this log (V1.2024.6)
(--------)
Hello W.,
You are right, multi-line header is not yet managed on Gantt..
Here is a workaround, using mono-line header, as:
@startgantt header <font color=red>Warning:</font>\nDo not use in production. title a title @endgantt
Enjoy,
Regards,Th.
That is now fixed (observed on v1.2026.3+)