Appearance
Gantt settings transforms
Use this guide when you need to format values in Gantt hover tooltips through schedule.* settings.
What settings can control
For Gantt tooltip fields, settings can define label, template, hidden, and order directly.
transform is different: the settings API stores data, not executable JavaScript. Because of that, the panel resolves only safe declarative descriptors before calling createConfig(...) for @mes/aps.
Supported descriptor: valueMap
The panel currently supports transform.type = valueMap for:
operationTooltipConfigconstraintsTooltipConfigsupplyTooltipConfig
Equivalent nested shape after useSettingsFind().mapSettings({ prefix: 'schedule' }):
json
{
"operationTooltipConfig": {
"late": {
"label": "Опаздывает",
"transform": {
"type": "valueMap",
"values": {
"true": "Да",
"false": "Нет"
},
"fallback": "Не задано"
}
}
}
}Settings API example:
text
schedule.operationTooltipConfig.late.label = "Опаздывает"
schedule.operationTooltipConfig.late.transform.type = "valueMap"
schedule.operationTooltipConfig.late.transform.values.true = "Да"
schedule.operationTooltipConfig.late.transform.values.false = "Нет"
schedule.operationTooltipConfig.late.transform.fallback = "Не задано"
schedule.operationTooltipConfig.locked.label = "Заблокирована"
schedule.operationTooltipConfig.locked.transform.type = "valueMap"
schedule.operationTooltipConfig.locked.transform.values.true = "Да"
schedule.operationTooltipConfig.locked.transform.values.false = "Нет"Matching rules
- Mapping keys are matched by the string form of the source value.
- Boolean values therefore use keys
trueandfalse. Datevalues are matched by theirISO 8601string form.- If no mapping entry matches, the transform returns
fallbackwhen it is provided.
Important limitations
- Strings such as
(value) => value ? 'Да' : 'Нет'are treated as plain data and are not executed. - Unsupported transform descriptor types are ignored.
- Date formatting is still handled separately by the panel date-display layer.
Demo fixture
The local fixture application local-gantt-transform-demo demonstrates this behavior for operation hover tooltips.