Creating Graph Views
Copy
Graph Views are defined using Graph View Definition Items, found under Administration --> Configuration --> Graph Navigation --> Graph View Definitions in the TOC.
A Graph View can display data constrained by a Query Definition (Query Based) or can display all data related to a root item if you create an Ad Hoc Query.
Graph View Definitions (GVD) are supported by the following ItemTypes:
- Node View Definition(NVD)
- Node Type(NT)
- Connector View Definition(CVD)
- Connector Types(CT)
- View Card(VC)
- System Default Card
Ad-hoc GVDs allow users to freely navigate items and item relationships based on the selected root item.
Use the following procedure:
- In the TOC go to Administration>Configuration>Graph Navigation>Graph View Definitions. The following menu appears.
- Click Create New Graph View Definition. The Graph View Definition screen appears.
- Enter a unique Namefor the GVD.
- Save the Graph View Definition.
- Click the Default View Cards relationship tab to associate ItemTypes in the Graph View with specific View Cards.
- Double-click the ItemType ID field and click the ellipses to select the ItemType to associate with the Part default view card. The ItemType Search dialog box appears.
Click the Add ItemTypes icon
in the Item Types Relationship Tab and pick the ItemTypes that will be permitted as root ItemTypes for the GVD. The following example uses the Part ItemType from which you can generate the example Graph View.
Click the Add View Cards icon
to add an existing view card to the Graph View.
Click the New View Card icon
to add a new view card to the Graph View.
Click the New gn_GVDefaultCard
icon to create a View Card. A new row appears.
Parts in the example Graph View use the Part Card. Graph View Definition Default View Cards take precedent over System Default Cards.
Query based GVDs enable users to view items, relationships, and data that are explicitly defined within a Query Definition. This can be useful when there is a need to filter or focus the user’s interaction on specific items and details.
Creating a Query Definition
Before creating a Query-based Graph View Definition, you must first create the Query Definition. For information on how to create a Query Definition, refer to the Query Builder Guide. Specifically, Section 2 walks you through creating a sample Query Definition. Use a carefully configured Query Definition to automatically generate the necessary underlying items for the Graph View Definition.
Creating a Query-Based Graph View Definition
Use the following procedure to create a Query Based Graph View Definition:
- Create a Query Definition using the Query Builder Application.
- Create a new Graph View Definition item, specifying a unique Name and selecting the desired Query Definition.
- Save the Graph View Definition. The following popup dialog appears:
- Clicking the generate button runs a method that generates all underlying ItemTypes and Relationships and maps them to the query items of the Query Definition. If you select the Treat Relationship As Connectoroption, all relationships in the Query Definition are treated as connectors. Otherwise, each relationship is drawn as a separate node and connectors will be implicit. If you select the Generate View Cards For Each Query Itema unique view card is generated for each Query Item and added as a GVD Default View Card. The generated view cards will have a row for each property selected for the Query Item in the Query Definition.
- In the Default View Cards Relationship Tab, you may associate ItemTypes in the Graph View with specific View Cards. Click on the New Relationship icon to pick a View Card. Then select the ItemType to associate the View Card with in the ItemType ID cell..
- In the Nodes Relationship Tab you can view and edit generated Node Types which are associated with the respective Query Item. Click on a Node Type to be directed to the Node Type Form. You may also associate an existing Node View Definition to a specific Node within the relationship tab.
- From a Node Type Form, you may add, remove, or edit Node Type Properties. The Name of a property is used to bind data to a View Card. See Section 4.1 for an example of a View Card that uses the content_bindingattributeto refer to Node Type content. The Value Templateis used to define the content to display. The Value Template supports both static and generated content. In Figure 11, observe that both name and state use Value Templates which refer to static and generated data.
- If desired, repeat Steps 6 and 7 for the generated connectors and Connector Types found in the Connectors Relationship Tab.
Use the following procedure:
- Navigate to AdministrationConfiguration Graph Navigation View Cardsinthe TOC. The View Cards menu appears.
- Click Create New View Card. The View Card window appears.
- Specify a unique Name.
- Specify the View Card Template Definition. See Section 4.1 for supported attributes and sample Templates.
Figure 12
Use the following procedure to create either a Node View or a Connector View Definition:
- Click AdministrationConfiguration Graph Navigation->Node View Definitionsinthe TOC. The following menu appears:
- Select Create NewNode View Definition.The Node View Definition window appears:
- Specify a unique Name.
- Enter p* in the Name column and click the Search icon:
- Select Part Card.
Click the Add View Cards icon
on the View Cards tab. The Search dialog box appears.
Click
and
to save and unclaim the NVD.
To enable a user to open a Graph View on a specific ItemType, navigate to the desired ItemType and on the Actions tab, add an Action that runs the gn_ShowGraph Method. When this action is applied to an item instance, it will generate a Graph View in a new tab. If no available Graph View Definitions have been created by an administrator, a system default Ad Hoc Graph View will always be available.
When you create and export packages that include graph views, it is important to include any associated items with the top-level Graph View definition. You may need to expose some of these items in the TOC to package them:
- gn_GraphViewDefinition
- gn_ViewCard
- gn_ConnectorType
- gn_NodeType
- gn_ConnectorViewDefinition
- gn_NodeViewDefinition
- gn_systemDefaultCard
You may also need to package any associated Query Definitions (qry_QueryDefinition), Actions, and Methods, depending on your graph view configuration.