Is it possible to control (i.e., skin) a single attribute in a class diag, or column in ERD?

+1 vote
asked Jun 8, 2022 in Bug by varontron
I am programmatically defining an ERD.  I have data about which columns contain data and which do not.  I'd like to "grey out" those columns.  Is this possible?

My less desirable alternatives include adding a separated section, akin to "methods" or "fields" or omitting these columns altogether.
commented Jun 8, 2022 by The-Lu (64,340 points)

Hello V.,

  • Have you a short example?

Regards.

commented Jun 8, 2022 by varontron

I can create a diag like this, where entity with stereotype <<empty>> is "greyed out".  I can partition the other entity, such that "empty columns" in otherwise populated tables are visually segragated (Image 1).  I could also omit those attributes altogether (Image 2: "Notes" column and divider are omitted).  Is there any way, even with a macro or some other non-declarative method, to change the formatting, as in the Image 3 where "Notes" is "greyed out?"

https://imgur.com/a/Qc8pB44

Thanks!

1 Answer

0 votes
answered Jun 8, 2022 by chris (2,540 points)

I'd use a class diagram. You can surround the field name with a colour annotation (which I think will  work on an object diagram too, but I've not tested):

example of greyed out field on a class object

HTH

commented Jun 9, 2022 by varontron
Hi Chris,

I couldn't find this syntax in the docs anywhere--for classes, notes, lines, backgrounds, etc, sure.  Can you provide a link or sample code?

Thanks!
commented Jun 9, 2022 by chris (2,540 points)
edited Jun 9, 2022 by chris
Apologies! If you click on the image in the answer, it's a link to the online server which will show you the code I used to generate the image.

Reference:
https://plantuml.com/creole

I don't contribute as often as I should so I forgot the citation :)
...