Style mappers

Permission: Settings management

Style mappers setting is a collection of global style mapper objects which are available in every visualization. These global mappers can't be changed by the user but users can use them as starting points for their own mappers.

Style mapper object is a simple configuration object which defines mappings of node or relationship DB property values to style values, e.g. color, width or shape. These style values are used for visualization styling/rendering. You can create multiple mappers based on the same DB property but with different styling conditions and different GUI title. Defined style mapper objects are listed in "Style" tab in visualization where user can choose and apply them to style the visualization.

Configuration

  1. Left menu - settings

  2. In panel "Settings list" use icon "Update" for setting "STYLE_MAPPERS".

  3. Enter JSON configuration and confirm by pressing "Save" button.

Default configuration

Default configuration contains no mappers.

  1. Left menu - settings

  2. In panel "Settings list" use icon "Update" for setting "STYLE_MAPPERS".

  3. Press button "Default" and store by pressing button "Save".

Automatic configuration

Automatic configuration contains no mappers. You have to create appropriate mappers manually.

  1. Left menu - settings

  2. In panel "Settings list" use icon "Update" for setting "STYLE_MAPPERS".

  3. Press button "Automatic", wait for generator to generate JSON and store by pressing button "Save".

Description of configuration

Configuration is entered as JSON. Example of JSON:

[
{
"id":"1",
"title":"Color by type",
"group":"nodes",
"mapperType":"discrete",
"property":"TYPE",
"styleProperty":"background_color",
"mapping":{
"TYPE_1":"rgb(200,100,100)",
"TYPE_2":"rgb(100,200,100)",
"_notMapped_":"rgb(100,100,100)",
"_undefined_":"rgb(0,0,0)"
}
},
{
"id":"2",
"title":"Num of Incidents",
"group":"nodes",
"mapperType":"linear",
"property":"NUM_OF_INCIDDENTS",
"styleProperty":"background_color",
"mapping":{
"minData":0,
"minValue":"#ccc",
"maxData":100,
"maxValue":"#f00",
"_undefined_":"#000"
}
}
]

Explanation of JSON properties:

Property

Values

Default

Description

Usage

id

MANDATORY

String

 

Mapper identification used for referencing purposes, e.g. in Style views setting.

Id can't start with space " " or exclamation mark "!".

Visualization

title

MANDATORY

String

 

Mapper title used in GUI.

Visualization

group

MANDATORY

"nodes", "edges", "mergedEdges", "dirMergedEdges"

 

Determines if this mapper is used to style nodes or relationships (edges).

Visualization

mapperType

MANDATORY

"discrete", "linear"

 

Discrete mapper is best used with properties which have a finite number of distinct values and these can be directly mapped to style values (types, categories, ...). When you choose "discrete" mapper you have to define mappings as single value or multiple values (see description od style for more information).

Linear mapper is best used with continuous numeric values (number of incidents, weight, performance indicators, ...). When you choose "linear" mapper you have to define mappings as single value or range of values (see description od style for more information).

Visualization

property

MANDATORY

String

 

Name of the DB property used in mapping. Values of this DB property will be used for determining the styling/rendering values in visualization when this mapper is used.

Set property to "_dbLabels" if you want to style nodes by DB labels.

Set property to "_dbRelType" if you want to style relationships by DB types.

Visualization

styleProperty

MANDATORY

"background_color", "background_image", "border_width", "border_color", "size", "shape", "line_color"