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 theGraphSchema
format 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 theSettings
format that is described in settings.schemaSettings.baseStyles
andschemaSettings.ruleBasedStyles
allow custom styling of the Schema View. This is similar tosettings.baseStyles
andsettings.ruleBasedStyles
that 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
Settings
interface 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 areexpanded
andcollapsed
. Schema View mode will be determined byschemaSettings.viewMode
and 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 areexpanded
andcollapsed
. This property will not have any effect when specified inschemaSettings
for Schema View as there is no legend region for this view.
The following shows an example
schemaSettings
for Schema View.{"viewMode": "expanded", "viewLabel": "Schema View", "baseStyles": { "vertex": { "label": "${properties.labelName}", "color": "blue" }}}
The following shows an example
settings
for Graph View.{"viewMode": "collapsed", "viewLabel": "Graph View", "legendState": "collapsed", "baseStyles": { "vertex": { "label": "${properties.labelName}", "color": "red"}}}
Parent topic: Schema View