Skip to content

Color state diagram "choice" #880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xeruf opened this issue Jan 26, 2022 · 4 comments
Closed

Color state diagram "choice" #880

xeruf opened this issue Jan 26, 2022 · 4 comments

Comments

@xeruf
Copy link

xeruf commented Jan 26, 2022

Reading through https://plantuml.com/state-diagram there seems to be no way to style a "choice"-element, i.e. change background and border color?

I had assumed skinparam state would then apply to it as well, but it doesn't...

@The-Lum
Copy link
Collaborator

The-Lum commented Jan 26, 2022

Hello @xeruf,

For that you can use style as:

@startuml
<style>
  diamond {
    BackgroundColor #palegreen
    LineColor #green
    LineThickness 2.5
}
</style>
state state1
state state2 
state choice1 <<choice>>
state end3    <<end>>

state1  --> choice1 : 1
choice1 --> state2  : 2
choice1 --> end3    : 3
@enduml

If that can help,
Regards.

@xeruf
Copy link
Author

xeruf commented Jan 27, 2022

Thank you very much! Please add that to the documentation :)

Though I am a little confused that there are html-like <style> blocks in addition to skinparam - is there any system in that? They seem to overlap in some places as well.

@arnaudroques
Copy link
Contributor

Though I am a little confused that there are html-like <style> blocks in addition to skinparam - is there any system in that? They seem to overlap in some places as well.

Yes, we are very slowly moving from skinparam to <style> but right now, not everything is possible through <style> so that's why skinparam is still there and that they overlap.

In some far future, skinparam will be deprecated (although we will still support it) and users will be encouraged to use only <style>. But right now, this is not ready :-)

@The-Lum
Copy link
Collaborator

The-Lum commented Jan 20, 2023

Hi all,

[This is an Issue Review]
This is now answered.

  • Thanks @xeruf for the report.
  • Thanks PlantUML team for your work.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants