Colours, link directions, class labels, the property display order can be altered by setting custom class metadata.
DFRNT provides a special section called "metadata" to define custom behaviours for types and traits. Although these behaviours cannot yet be accessed through the user interface, they can be manually set. To define custom behaviours for a class, simply include the key "DFRNT" in the "@metadata" section and choose from the keys listed below:
reversedEdgeDirection: ["myProperty1", "myProperty2"]
If you have properties called myProperty1 and myProperty2 that are defined as links to other types, you can reverse the direction of the links in visualisations. By default, all links go "out" from a record to another record. However, if you include a property in the propertyReversedEdgeDirection, the direction will be reversed and go "in" to the record from the linked record.
By using the hexRgbBackground key, you can customise the default colour of a type when it is displayed in a graph. Normally, the colors are automatically chosen based on a hash with constant luminance. However, with hexRgbBackground, you have the ability to set a custom colour for your type.
labelOverride: "My Custom Type Name"
By setting a labelOverride, the class name will be overridden in the DFRNT user interface. This provides a convenient way to customise the display name of a class according to your preference.
Instead of using the default class name, you can choose a more descriptive or meaningful label that accurately represents the purpose or content of the class. This can be particularly useful when working with complex data models or when the default class names are not intuitive.
With the ability to override the label, you can ensure that the class names in the DFRNT user interface align with your specific requirements.
propertyDisplayOrder: ["myProperty1", "myProperty2"]
If you set the propertyDisplayOrder, the properties in the record navigator will be displayed in the order you specify. This allows you to customise the display order of properties according to your preference.
Additionally, if a property is not included in the propertyDisplayOrder, it will be hidden from the navigator, allowing you to selectively hide certain keys from being displayed.