The ability to customise the highlight for json/yaml

0 votes
asked Mar 4, 2021 in Wanted features by chris (2,540 points)
edited Mar 4, 2021 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:

commented Nov 15, 2022 by Ryan

Would it be possible to allow for multiple colors? My use case is highlight two things and add a legend.

1 Answer

0 votes
answered Mar 5, 2021 by plantuml (294,960 points)
selected Mar 5, 2021 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, 2021 by chris (2,540 points)
Yes, brilliant, thank you! I may iterate further on the colour scheme, though... ;)
commented Mar 8, 2021 by The-Lu (63,920 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, 2021 by The-Lu (63,920 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, 2021 by The-Lu (63,920 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.

commented Jul 6, 2021 by ysomic (120 points)
Hello

I'm enjoying to enhancements. Is it possible to change the linetypes to ortho? I'm unable to achieve this.
commented Nov 16, 2022 by The-Lu (63,920 points)
...