Using internal or external icons

Internal icons

Graphlytic contains several icons for direct use in style mappers (when mapperType="discrete", group="nodes" and styleProperty="background_image"). In order to use internal icons, just construct an internal URL that contains the prefix "icon/" and the name of the icon you want to use. The name of the icon consists of the name of icon shape and icon color concatenated with an underscore ("_") and suffix ".png".

Example of an internal URL: "icon/app_1_blue.png" or "icon/user_1_red.png".

See the image with all internal icons and examples below for more information.

Example of style mapper with internal icons

{
"id":"iconMapper_1",
"title":"Icon by type",
"group":"nodes",
"mapperType":"discrete",
"property":"TYPE",
"styleProperty":"background_image",
"mapping":{
"TYPE_1":"icon/monitor_1_blueLight.png",
"TYPE_2":"icon/virtual_1_red.png",
"_notMapped_":"icon/unknown_1_blueLight.png",
"_undefined_":"icon/unknown_1_blueLight.png"
}
}

Internal icons

images/download/attachments/44508784/Graphlytic-interne_data_ikony.jpg

External icons

If you want to use other than internal icons in style mappers you can do it by:

  • uploading icons (jpg, png, gif) into the icons directory in Graphlytic's installation folder - see Custom Icons for more info

  • use them in mappers by referencing them as "icons/name_of_my_icon.png"

PLEASE DO NOT USE SPACES IN ICON NAMES - Cytoscape.js can have problems with rendering icons with spaces in the name of the icon

Example of style mapper with external icons:

{
"id":"iconMapper_1",
"title":"Icon by type",
"group":"nodes",
"mapperType":"discrete",
"property":"TYPE",
"styleProperty":"background_image",
"mapping":{
"TYPE_1":"icons/my_icon.png",
"TYPE_2":"icons/my_other_icon.png",
"_notMapped_":"icon/unknown_1_blueLight.png",
"_undefined_":"icon/unknown_1_blueLight.png"
}
}