Groups are templates for either edges ("edgeGroups") or nodes ("nodeGroups"). Drugst.One comes with some predefined groups, but you can overwrite any styles and define your own groups as you please. As we use Vis.js in Drugst.One, most of the Vis.js features are supported.
Drugst.One requires some groups do be always defined to work out of the box. These groups need to be defined, but all styles can be overwritten in your custom configuration.

Node groups define the style of the nodes assigned to them. You can define your own node groups with your custom styles. Later, you simply need to pass the group to the nodes in the "group" argument and the style will be applied.

A group can contain any of the vis.js node options, but must contain "groupName", "type", "shape" and "color". Name Type Description {{ entry.name }} {{ entry.type }} {{ entry.description }} A minimal configuration of a node group could look like this:

The edge groups define the styles of the network nodes. Similar to "nodeGroups", you can define custom edge groups to design your edges. There is only one edge group predefined, the edge group "default". An edge group must have at least the attributes "groupName" and "color". Optionally, attributes like "dashes" can be passed onto the group as they are defined in vis.js Name Type Description {{ entry.name }} {{ entry.type }} {{ entry.description }} A minimal configuration of an edge group could look like this:

Drugst.One requires some default groups like a group for the found nodes in the target search ("foundNode") or a group for the found drugs in the drug search ("foundDrug"), thus the styles for these groups are predefined. The default groups defines the style of all nodes without a group. However, these styles may be partially or completely overwritten by you.

"default" groups should just be used as falllbacks and do therefore not appear in the custom legend.
Name Function {{ entry.name }} {{ entry.function }}

The full default configuration for the "nodeGroups" and "edgeGroups" can be found below: