2.3.3 Schema View Configuration Parameters
In order to enable Schema View in your visualization, you must configure a few related properties.
The following properties control the behavior of Schema View:
schema(optional): This provides the data that is shown in a Schema View. This property takes data in theGraphSchemaformat that is described in settings. Schema View will not be supported if this property is not confgured.schemaSettings(optional): This defines various settings (for example, styling) to control the rendering of Schema View. This property follows theSettingsformat that is described in settings.schemaSettings.baseStylesandschemaSettings.ruleBasedStylesallow custom styling of the Schema View. This is similar tosettings.baseStylesandsettings.ruleBasedStylesthat customize styling for the existing graph view.If styling is not specified through
schemaSettings, then the Graph Visualization library will use a default styling to render vertices and edges in Schema View. Also, certain features like pagination, legends, and so on will not apply to Schema View. Therefore, such attributes will not have any effect even if configured inSettings.- The
Settingsinterface supports the following additional properties to customize Schema and Graph views display in the graph visualization panel. See settings for more information on each of the following properties.viewMode(optional): This controls the Schema View and Graph View display. It can also be used to switch between views at runtime. Supported values areexpandedandcollapsed. Schema View mode will be determined byschemaSettings.viewModeand Graph View mode will be determined bysettings.viewMode.viewLabel(optional): This specifies a label that is displayed in Schema View or Graph View. If configured, the value will appear as a label on the top center of the corresponding view. It will also be used in the tooltip for the Schema View and Graph View toggle buttons.legendState(optional): This specifies whether the legend region in the Graph View is in expanded or collapsed state. Supported values areexpandedandcollapsed. This property will not have any effect when specified inschemaSettingsfor Schema View as there is no legend region for this view.
The following shows an example
schemaSettingsfor Schema View.{"viewMode": "expanded", "viewLabel": "Schema View", "baseStyles": { "vertex": { "label": "${properties.labelName}", "color": "blue" }}}The following shows an example
settingsfor Graph View.{"viewMode": "collapsed", "viewLabel": "Graph View", "legendState": "collapsed", "baseStyles": { "vertex": { "label": "${properties.labelName}", "color": "red"}}}
Parent topic: Schema View