On this page

Each Legend Item of a Legend should have a unique style. This style is defined by specifying Legend Item adornment properties. After creating or displaying a Legend in a diagram or table, Legend Item adornment (style) is applied to the symbols or table rows of corresponding elements and represented as Legend Item icon inside the Legend. There are a wide range of Legend Item adornment properties including:

  • Fill color
  • Text color
  • Shape or path line color, style and width
  • Icon and icon position on shape or path

Table adornment

If you specify Legend Item adornment for the Legend that is applied to a table, you should only specify the Fill Color property. Other adornment properties, e.g., Icon, Pen Color or Line Style, are not applied to table rows.

You can specify the adornment properties of a Legend Item in the Adornment Properties dialog.


To access the adornment properties of a Legend Item


  1. Open the Specification window of a Legend Item.

  2. Click the specification cell of the Adornment property, and then click .
  3. In the Adornment Properties dialog, specify the desired adornment properties.


Adornment Properties dialog.


How to avoid conflicting Legend Items

If you use multiple Legends in one diagram, you should specify a different set of adornment properties for Legend Items of each Legend. This way Legend Items of different Legends do not conflict when applied to the same element. For example, try using Fill Color in one Legend, and Icon in another. If you want to use the Icon property in multiple Legends, then specify different Icon Position on Shape/Path for Legend Items of each Legend. I addition, you can define Legend Item adornment by specifying the Pen Color, Line Width and Line Style properties describing the appearance of a shape border or path.

Legend Item priority

If you can not avoid conflicting Legend Items in a diagram or table, specify the Priority property for each Legend Item. It defines which Legend Item should be applied in case several Legend Items conflict.



Example

Let's say you want to use two legends in a Requirements Diagram: the Status Legend indicating the status of each Requirement and the Risk Legend showing the risk level of Requirements. It is likely that Legend Items from both Legends will be applied to the same Requirement. For example, a single Requirement can have both status and risk values specified. Let's analyse this specific use case by creating the Legends mentioned above and defining their Legend Item adornment properties so that Legend Items would not conflict when applied to the same Requirement:

  1. Open the desired Requirements Diagram.
  2. In the diagram, create a legend intended to show the status of Requirements and name the Legend Status.
  3. Create and define the Legend Items for the Status Legend by completing the following steps:
    1. Create four Legend Items indicating four possible Requirement status values and name them Closed, Approved, Disapproved and In Progress.
    2. Open the Specification window of the first Legend Item.
    3. Specify the Legend Item adornment by selecting the desired Fill Color.
    4. Specify the Elements by Condition property by creating a Property Test operation and selecting the Status property value the Legend Item represents.
    5. Repeat the steps from b. to d. with the rest of the Legend Items.
  4. In the same agram, create a Legend to indicate the risk level of Requirements and name the Legend Risk.
  5. Create and define the Legend Items for the Risk Legend by completing the following steps:
    1. Create three Legend Items indicating three possible Requirement risk levels and name them High, Medium, and Low.
    2. Open the Specification window of the first Legend Item.
    3. Specify the Legend Item adornment by selecting the desired Icon and Icon Position on Shape.

      Specifying Icon

      When specifying the Icon property:

      • Click  to select an image from the Image Library of your modeling tool.
      • Click  to select a custom image from the local file system.
      • Click  to specify the URL of an image.
    4. Specify the Elements by Condition property by creating a Property Test operation and selecting the Risk property value the Legend Item represents.

    5. Repeat the steps from b. to d. with the rest of the Legend Items.


If you followed the above steps, you have a Requirements Diagram with the Status and Risk Legends applied to it. The Legend Items of both Legends do not conflict when applied to the same shape, as shown below.


The figure displays a Requirement shape with two Legend Items applied to it.
The Legend Items do not conflict due to different adornment properties used to define them.