Json object: changing background color of Header line

0 votes
asked Sep 7 in Question / help by mowmow

Hi,

I'm looking for a way to change the background color of Jason object's header line

For example, I have some code below. Is there any way to change it on the "student" line? I know there is a way to change the whole table color but I can't find the way to change just the header line.

I'm planning to combine Jason objects in some other type of diagrams.

:::::::

@startuml

json "student" as j {

"name": "Steve",

"sex": "male"

}

@enduml

::::::::::

2 Answers

0 votes
answered Sep 7 by The-Lu (74,900 points)

Hi M.,

It is not yet possible.

I just post this request:

Awaiting this functionality, here is a little workaround:

@startuml

json "<back:gray><color:red>student" as j {
"name": "Steve",
"sex": "male"
}

@enduml

Regards,
Th.

0 votes
answered Nov 19 by The-Lu (74,900 points)

Hello M.,

FYI that is now implemented on v1.2024.8:

- Thanks PlantUML team for your work.

With style, as:

@startuml
<style>
json {
    header {
      BackGroundColor palegreen
      FontColor blue
      FontSize 18
      FontStyle bold
      LineThickness 3
      LineStyle 30-5
    }
}
</style>

json "student" as j {
"name": "Steve",
"sex": "male"
}
@enduml

Ref.:

Enjoy,
Regards,
Th.

...