Declare and use multiple styles in Gantt chart

0 votes
asked Jan 24 in Wanted features by Eugenia
Hi all,

I would like to declare multiple styles for arrows, tasks, etc and then refer to them during my plan.

Something like this

<style>
ganttDiagram {
    arrow [BlackArrow] {
        LineColor black
    }

arrow [GreenArrow] {
        LineColor Green
    }

}
</style>

[Block 1] starts at [01]'s start and ends at [10]'s end <GreenArrow>

[Block 2] starts at [11]'s start and ends at [15]'s end <BlackArrow>

1 Answer

+1 vote
answered Feb 6 by The-Lu (64,760 points)

Hello E. and all,

That was not yet implemented...

See similar request here:

Then, in continuation of other plantuml functionalities, here is a proposal (for the syntax, using stereotypes) for a wanted feature:

@startgantt

<style>
.BlackArrow {
  ganttDiagram {
    arrow {
      LineColor Black
    }
  }
}
.GreenArrow {
  ganttDiagram {
    arrow {
      LineColor Green
    }
  }
}
.Critical {
  task {
    lineColor red
  }
}
</style>

[01] requires 5 days
then [10] requires 2 days
[Block 1] starts at [01]'s start and ends at [10]'s end <<GreenArrow>>

[11] requires 2 days
then [15] requires 3 days
[Block 2] starts at [11]'s start and ends at [15]'s end <<BlackArrow>> <<Critical>>
@endgantt

To debate...
Perhaps other proposal are possible... like `is styled on BlackArrow and Critical`...

Awaiting full style management with stereotype on Gantt chart...
Regards,
Th.

...