Orgchart view
The orgchart view expects special configuration properties in the section config:
parentsId (string):
Required
This defines a key that is to be used to get the entries that are parents of the current entry in the chart. Example section config inside the application.yaml:
- name: orgchartDemo
group: organigram
caption: Austria
type: orgchart, list
parentsId: PARENT_COMPANIESThis means that for every entry, the key PARENT_COMPANIES will be used to get the parents of that entry. Note that the PARENT_COMPANIES field needs to be an array. If we have 3 entries like this:
{
"lastUpdated": 1666791810,
"sourceIdentifier": "src",
"key": "CMP0034",
"name": "CMP0034",
"title": "CMP0034",
"data": {
"PARENT_COMPANIES": []
}
},
{
"lastUpdated": 1666791810,
"sourceIdentifier": "src",
"key": "CMP0035",
"name": "CMP0035",
"title": "CMP0035",
"data": {
"PARENT_COMPANIES": []
}
},
{
"lastUpdated": 1666791810,
"sourceIdentifier": "src",
"key": "CMP0001",
"name": "CMP0001",
"title": "CMP0001",
"data": {
"PARENT_COMPANIES": ["CMP0034", "CMP0035"]
}
},It means that the entries with ID's CMP0034 and CMP0035 will be shown as parents of this entry, CMP0001:
You can also use path syntax in the parentsId field to access nested fields. For example, defining the field as TABLE_INFO.METADATA.PARENT_COMPANIES would correctly get the field if the corresponding entry looked like this:
{
"data": {
"TABLE_INFO": {
"METADATA": {
"PARENT_COMPANIES": ["CMP0034"]
}
}
}
}Style
Title
The title of an organization is automatically set. The first section column where showInTableHeader is set to true is used.
Teaser/Desc
Below the title an additional description field. The second section column where showInTableHeader is set to true is used. Please notice that only string columns are supported. So no markdown or HTML support.
parentsLabel (string):
Optional
The parentsLabel field works in the same way as the parentsId field, except it describes the ID of the field to be used for annotating the connection to the parents. For example, this section config:
- name: orgchartDemo
group: organigram
caption: orgchartDemo
type: orgchart, list
parentsId: PARENT_COMPANIES
parentsLabel: PARENT_COMPANIES_LABELSWith these entries:
{
"lastUpdated": 1666791810,
"sourceIdentifier": "holding",
"key": "CMP0034",
"name": "CMP0034",
"title": "CMP0034",
"data": {
"PARENT_COMPANIES": [],
"PARENT_COMPANIES_LABELS": []
}
},
{
"lastUpdated": 1666791810,
"sourceIdentifier": "holding",
"key": "CMP0035",
"name": "CMP0035",
"title": "CMP0035",
"data": {
"PARENT_COMPANIES": [],
"PARENT_COMPANIES_LABELS": []
}
},
{
"lastUpdated": 1666791810,
"sourceIdentifier": "holding",
"key": "CMP0001",
"name": "CMP0001",
"title": "CMP0001",
"data": {
"PARENT_COMPANIES": ["CMP0034", "CMP0035"],
"PARENT_COMPANIES_LABELS": ["75%", "25%"]
}
},Would produce the following output:
Same as the parentsId field, the parentsLabel can also contain a nested path syntax.
Highlights
The top border-color (see image above) of the different org chart items can be customized depending on the data. For example: an organization that fulfills the condition Country == ‘AUT’ gets a red border. Others are grey.
This can be achieved with Field Processors. The Orgcharts expects a source field processor with key highlights. The value should be the color in hex format e.g. #ff0000 for red.
Shape
The shape of the organization can be customized.
This can be achieved with Field Processors. The Orgcharts expects a source field processor with a key shape. The value should be eitherrectangle (default) or rounded