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 (55,060 points)

Hello V.,

  • Have you a short example?


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?"


1 Answer

0 votes
answered Jun 8, 2022 by chris (1,860 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


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?

commented Jun 9, 2022 by chris (1,860 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.


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