How to set a font size of a group in Activity Diagram

0 votes
asked Jul 28, 2022 in Question / help by Gil
I am using a new syntax of activity diagram.

I am using a lot of "groups" like the attached below.

For some reason, I can set a font of the activity labels but not for the groups (which left as some default size). Any idea how to set the group font-size?

Also, I was looking in the documentation of "PlantUML_Language_Reference_Guide..." and didn't find there the answer about skinparam specific for activity diagram...

Is there any other document where I can find these?

Thanks in advance,

Gil

skinparam activityFontSize 20
skinparam activityDiamondFontSize 20
skinparam activityArrowFontSize 20

group Some feature #1
  :Variable #1 assign;
  group Some sub-feature #1
    :Variable #1 assign;
  end group

  group Some sub-feature #1
    :Variable #1 assign;
  end group
end group

1 Answer

0 votes
answered Jul 28, 2022 by The-Lu (64,340 points)

Hello G.,

Here is a first proposal, with partition (Yes it is a little obvious...):

@startuml
<style>
partition {
  FontSize 20
}
</style>
skinparam activityFontSize 20
skinparam activityDiamondFontSize 20
skinparam activityArrowFontSize 20

group Some feature #1
  :Variable #1 assign;
  group Some sub-feature #1
    :Variable #1 assign;
  end group

  group Some sub-feature #1
    :Variable #1 assign;
  end group
end group
@enduml

But you can change size directly for all the activity as:

@startuml
<style>
activityDiagram {
  FontSize 20
}
</style>

group Some feature #1
  :Variable #1 assign;
  group Some sub-feature #1
    :Variable #1 assign;
  end group

  group Some sub-feature #1
    :Variable #1 assign;
  end group
end group
@enduml

If that can help,
Regards.

commented Jul 29, 2022 by plantuml (295,000 points)

And using the full style syntax, you can have:

@startuml
<style>
activityDiagram {
  'By default
  FontSize 10

  'Just for activity
  activity {
    FontSize 7
  }

  'For group
  partition {
    FontSize 20
  }
}
</style>

group Some feature #1
  :Variable #1 assign;
  group Some sub-feature #1
    :Variable #1 assign;
  end group

  group Some sub-feature #1
    :Variable #1 assign;
  end group
end group
@enduml

commented Aug 4, 2022 by Gil

Many thanks  The-Lu  !

BTW, is it written somewhere in the "PlantUML_Language_Reference_Guide..."?

Gil

...