Can we apply style to map?

0 votes
asked Oct 8 in Wanted features by dragondive (440 points)
recategorized Oct 9 by dragondive
I took the latest beta as mentioned on this question https://forum.plantuml.net/14563/style-object-allow-style-on-object-diagram. This applies the style to the object mentioned in object diagram, but using similar syntax for map (that is, replace object with map) doesn't do anything. Is this not supported currently, or I need to use a different syntax?
commented Oct 8 by The-Lu (36,620 points)

Hello D.,

Yes, it is not supported currently... Then it is a wanted feature...

@PlantUML:

  • Could you allow style on  [Object] map Diagram?

Here are some example:

@startuml
<style>
root {
  FontColor Red
  BackgroundColor palegreen
}
</style>

object London

map CapitalCity {
 UK *-> London
 USA => Washington
 Germany => Berlin
}
@enduml

Regards,
Th.

commented Oct 9 by dragondive (440 points)
@Th
Thanks for confirming that. I have now changed the category to wanted features.
commented Oct 22 by plantuml (263,020 points)
Thanks for your feedback.

This is fixed in last beta http://beta.plantuml.net/plantuml.jar and on the online server.
commented Oct 22 by The-Lu (36,620 points)

Hello PlnatUML team,

Here are some other KO tests wink:

Compare:

map {
    BackGroundColor lightblue
    FontColor blue
}

object {
    BackGroundColor lightblue
    FontColor blue
}

header {
    BackGroundColor palegreen
    FontColor red
}

And:

header {
    BackGroundColor palegreen
    FontColor red
}
map {
    BackGroundColor lightblue
    FontColor blue
}
object {
    BackGroundColor lightblue
    FontColor blue
}

Then a full example:

@startuml
<style>

map {
    BackGroundColor lightblue
    LineColor lightblue
    FontName Helvetica
    FontColor blue
    FontSize 18
    FontStyle bold
    RoundCorner 20
    LineThickness 2
    LineStyle 10;5
}

object {
    BackGroundColor lightblue
    LineColor lightblue
    FontName Helvetica
    FontColor blue
    FontSize 18
    FontStyle italic
    RoundCorner 20
    LineThickness 2
    LineStyle 10;5
}

header {
    BackGroundColor palegreen
    LineColor lightblue
    FontName Helvetica
    FontColor red
    FontSize 18
    FontStyle bold
    RoundCorner 20
    LineThickness 2
    LineStyle 10;5
}
</style>

object London

map CapitalCity {
 UK *-> London
 USA => Washington
 Germany => Berlin
}

object user {
  name = "Dummy"
  id = 123
}
@enduml

Thanks for your future enhancement,
Regards,
Th.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...