The ability to customise the highlight for json/yaml

0 votes
asked Mar 4 in Wanted features by chris (1,500 points)
edited Mar 4 by chris

Firstly, thanks for all the work! The json/yaml support is really looking good. As always though I want to be able to style the visualisation. The #highlight functionality makes it really easy to focus on specific elements, and I can see this being really helpful - however, it would be great if we could choose what the highlight does.

It seems it might be trivial for us to select the highlight colour, which would be my primary request, however would it also be possible for this to carry through changes to style for the text, for example?

To be able to say something like:

<style>
jsonDiagram {
    node {
        highlight {
            BackGroundColor lightblue
            FontStyle bold
        }
    }
}
</style>

For example, choosing the same colour as the highlight makes the text unreadable:

1 Answer

0 votes
answered Mar 5 by plantuml (251,240 points)
selected Mar 5 by chris
 
Best answer

We have added some new feature in last beta http://beta.plantuml.net/plantuml.jar

(you can click on image)

Is this what you were expecting ?

commented Mar 5 by chris (1,500 points)
Yes, brilliant, thank you! I may iterate further on the colour scheme, though... ;)
commented Mar 8 by The-Lu (19,980 points)

Hello all,

This is OK for JSON (I just update the doc.).
- Is it plan to have the same thing for YAML?

Regards,
Th.

commented Mar 13 by The-Lu (19,980 points)

Hello PlantUML,

Thanks for this enhancement for YAML (test on 1.2021.3beta6).

  • Could you add some default value for highlight style, as for JSON?

Here is an exemple:

With style: OKWithout style: KO
@startyaml
<style>
yamlDiagram {
    highlight {
      BackGroundColor red
      FontColor white
      FontStyle italic
    }
}
</style>
#highlight "fruit"
fruit: Apple
size: Large
color: Red
@endyaml
@startyaml
#highlight "fruit"
fruit: Apple
size: Large
color: Red
@endyaml

Thanks for work,
Regards,
Th.

commented Mar 29 by The-Lu (19,980 points)

Hello PlantUML team,

Then could you add

    highlight {
      BackGroundColor #ccff02
    }

on 

yamlDiagram {
...
} 

for style definition (on plantuml.skin)

Thanks for your work,
Regards,
Th.

...