Gantt: Color just ONE Task differently

0 votes
asked May 5, 2021 in Question / help by anonymous

Hi!

I have a Style-section for "Task":

 task { 
FontName Helvetica 
FontColor black 
 }

This applies to ALL tasks in the gantt-diagram.

My Question: Is it possible to add another FontColor to just ONE specific Task? The other ones should stay with FontColor Black.

Thx!

1 Answer

0 votes
answered May 5, 2021 by The-Lu (63,920 points)

Hello A.,

Style for gantt diagram is locally, then you can add a lot of style during the task definition as:

@startgantt
<style>
task { 
  FontName Helvetica 
  FontColor black
}
</style>
Project starts 2020-11-13
[One] lasts 7 days
then [Eight] lasts 1 days
<style>
task { 
  FontColor red
}
</style>
then [Nine] lasts 4 days
<style>
task { 
  FontColor black
}
</style>
then [Ten eleven] lasts 1 days
then [Twelve] lasts 4 days
@endgantt

If that can help,
Regards,
Th.

commented May 6, 2021 by anonymous

Thx ... but unfortunately your code doesn't work for me ... "Nine" stays black.

Could it be that I need V1.2021.5 for this?

commented May 6, 2021 by The-Lu (63,920 points)

Hello A.,

I think, with some modification on style on the very last versions (See ChangeLog)

But, if it is very locally, on only on FontColor, we can use creole form with HTLM legacy syntax as:

@startgantt
Project starts 2020-11-13
[One] lasts 7 days
then [Eight] lasts 1 days
then [<color:red>Nine] lasts 4 days
then [Ten eleven] lasts 1 days
then [Twelve] lasts 4 days
@endgantt

If that can help,
Regards,
Th.

commented May 6, 2021 by anonymous

I will try to get V1.2021.5 installed ...

BUT: 

Creole Form worked!

Thank you very much!! yessmiley

...