WBS Diagram - Inline Node Styles with Multiline

0 votes
asked Oct 25, 2024 in Bug by bml91

Copying my question from SO here: https://stackoverflow.com/questions/79123445/inline-node-styles-not-being-applied-to-multi-line-wbs as someone in the answers recommended I do so.

I'm building simple org charts using PlantUML & WBS Diagrams, as per documentation: https://plantuml.com/wbs-diagram

I'm trying to apply inline node styles, this works:

@startwbs
<style>
wbsDiagram {
  .highlight {
      BackgroundColor pink
  }
}
node {
    Padding 12
    Margin 30
    HorizontalAlignment center
    LineColor #008AC9
    LineThickness 3.0
    BackgroundColor #A6E1FF
    RoundCorner 10
}
</style>

* John Doe <<highlight>>
** Jane Smith
*** Bob Brown
** Alice Green

@endwbs

This works just fine generating: https://i.sstatic.net/JpKcFjA2.png

But when I try to use it with the multi line nodes like so:

@startwbs
<style>
wbsDiagram {
  .highlight {
      BackgroundColor pink
  }
}
node {
    Padding 12
    Margin 30
    HorizontalAlignment center
    LineColor #008AC9
    LineThickness 3.0
    BackgroundColor #A6E1FF
    RoundCorner 10
}
</style>

*:<b>Manager</b>
John Doe
<<highlight>>;
**:<b>Lead Developer</b>
Jane Smith;
***:<b>Senior Developer</b>
Bob Brown;
**:<b>QA Lead</b>
Alice Green;

@endwbs

It doesn't work - it looks like: https://i.sstatic.net/65ps6hcB.png

How can I apply styles to multiline nodes?

1 Answer

0 votes
answered Oct 25, 2024 by The-Lu (88,340 points)

Hello 

Here is the good syntax:

*:multiline
node; <<stereotype>>

Then:

@startwbs
<style>
wbsDiagram {
  .highlight {
      BackgroundColor pink
  }
}
node {
    Padding 12
    Margin 30
    HorizontalAlignment center
    LineColor #008AC9
    LineThickness 3.0
    BackgroundColor #A6E1FF
    RoundCorner 10
}
</style>

*:<b>Manager</b>
John Doe; <<highlight>>
**:<b>Lead Developer</b>
Jane Smith;
***:<b>Senior Developer</b>
Bob Brown;
**:<b>QA Lead</b>
Alice Green;

@endwbs

Enjoy,
Regards,
Th.

commented Oct 25, 2024 by bml91
I see - thank you - the documentation might need updating to reflect this case.
commented Oct 27, 2024 by The-Lu (88,340 points)

Hello B.,

The doc. is open, and if you want, you can contribute to the doc. here:

Regards,
Th.

...