[UseCase] Problem to apply syle class on use case

0 votes
asked May 6, 2021 in Bug by Bada (120 points)

Hello,

I tried to style some use case diagram with a stereotype but I don't manage to do it with the "style" notation.

My example :

@startuml

<style>
{
        usecase{
            BackgroundColor #FF0000    
            .tech {
                BackgroundColor #00FF00
            }
        }
        actor {
            BackgroundColor #FF0000
            .tech {
                BackgroundColor #00FF00
            }
        }
    }
}
</style>

:actor1: as act1
:actor2: << tech >> as act2

(use case 1) as uc1
(use case 2) << tech >> as uc2

@enduml

In this case, uc2 doesn't apply <<tech>> style.
(example http://www.plantuml.com/plantuml/png/bL3Bgi8m45rtlcBWRcutsdHPGYWA_Oym3Gh61l9OYFJVdQbPY0XYoC1m7YUSZ2dRcClL0-YKRzuPk4FJbEJ89YThSx1qESLGblaOV8ZuDqqT7w5aTjdH6KNvGTfr8XPkXUTOoany2Vuvb-yAUbyRmB2zeWQq2NbL5UW7r1gtN6CgrmFySrkKkgXQGGkf5wnltqo5s3EwPUPVUm00)

I've tried with the skinparam syntax and it works for me :

@startuml
skinparam ActorBackgroundColor #FF0000
skinparam ActorBackgroundColor<< tech >> #00FF00
skinparam UsecaseBackgroundColor #FF0000
skinparam UsecaseBackgroundColor<< tech >> #00FF00

:actor1: as act1
:actor2: << tech >> as act2

(use case 1) as uc1
(use case 2) << tech >> as uc2
@enduml

(example : http://www.plantuml.com/plantuml/png/XOuz2iCm38LtdqAGfTbYZo64j8NSe0SGYcbB_5Ciw_wDmT3GnPh4q_i-j736bCKxnVixV32XXolbc6v8-pD52TizkfYWMzVXc4PjcY1RUi4yGpSC1Ja13xQ4RDlcMcoxrOZb2Jq2CXohhe4PuTUkDwFKHTX2COFkIogaJvdf_o0XenORDl7k2m00)

I don't know if I am using it wrong or if it's a bug. Please tell me if a don't use the proper syntax.

Thanks for your support.
Regards.

commented May 6, 2021 by The-Lu (74,900 points)

Hello all,

This is a defect.
Here is a minimal example:

@startuml
<style>
.tech {
  BackgroundColor #00FF00
}
</style>

:actor 1: as act1
:actor 2 -tech: << tech >> as act2
actor "actor 3 -tech" << tech >> as act3

(use case 1) as uc1
(use case 2 -tech) << tech >> as uc2
usecase "use case 3 -tech" << tech >> as uc3
@enduml

Regards,
Th.

1 Answer

+2 votes
answered May 6, 2021 by plantuml (295,800 points)

Many thanks for your minimal example ! It helps at lot to fix the issue.

So it is in last beta http://beta.plantuml.net/plantuml.jar and on the online server

...