Assigning IDs to shapes
After declaring the namespace, assign monitor model IDs that are associated with the namespace to each of the shapes that you want to use in the visual model. Specifically, assign a monitor model ID to each shape that you want to color-code, display values in, make into a hyperlink, and hide or show at run time.
About this task
Procedure
- In an SVG editor, add the following attribute to each important shape (for example, to <g> (group) or <text> elements): mm:id
- Add a meaningful value for the shape, such as California or shipment_duration_value. You cannot use spaces in the ID.
Results
mm:id="shipment_duration_value"
What to do next
If you want to be able to refer not only to individual shapes (for example, individual states), but also to groups of shapes (for example, regions), you can add multiple IDs for one shape, separated by spaces. For example, if you have a map shape called NORTHWEST (mm:id="NORTHWEST") and you also want individual states such as Montana (MT) and Oregon (OR) to belong to the NORTHWEST shape set, you might have the following list of IDs: mm:id="MT NORTHWEST" and mm:id="OR NORTHWEST". When the diagram is imported, the Monitor Model editor creates three shape sets, called NORTHWEST, MT, and OR. The NORTHWEST shape set has a single shape inside (with an ID of NORTHWEST), and when you apply an action to this shape set, it affects all the shapes in the SVG that have NORTHWEST in their list of IDs.