Skip to content

Gantt ​

Purpose ​

Use a gantt panel to inspect and operate on a production schedule that has already been opened through a schedule action. It visualizes equipment, operations, calendars, supplies, and constraints; it does not fetch an arbitrary dataset from panel JSON.

When to use ​

Choose Gantt when the task is schedule analysis, generation, allocation, or adjustment. Use Calendar for the working calendar of one selected object and Table for ordinary records. A Gantt normally follows a Schedule table whose openSchedule action loads the active schedule.

Prerequisites and ownership ​

  • openSchedule, getSchedule, or another schedule action loads a schedule into the panel schedule store.
  • panelActions own the host toolbar and call schedule actions.
  • The panel adapter owns API-to-APS date normalization, timezone and locale policy, safe display transforms, viewport restoration, overlays, and the unscheduled-operation drawer.
  • Installed @mes/aps@1.23.0 owns the chart, its data model, most schedule.* settings, drag eligibility, and drawing behavior.

Capability map ​

AreaSupported behavior
Schedule viewEquipment rows, scheduled operations, supplies, calendars, dependencies, and constraints from the loaded schedule response
ToolbarCommon schedule actions such as generate, update, save, lock, unschedule, layer/calendar toggles, secondary constraints, material movement, and the unscheduled drawer
DatesAPI instants are normalized to strict UTC ISO values at the APS boundary; an explicit IANA timezone wins, otherwise the browser timezone is used, with UTC as technical fallback
Display fieldsLabels, visibility, order, templates, configured date formatting, and safe valueMap transforms for operation, constraint, supply, and dependency-arrow fields
Operation dependenciesWhen APS needs the dependencies for an operation, the panel automatically posts to GetWorkOrderOperationDependencies and returns that response to APS so it can draw dependency arrows
ViewportIn-memory save/restore by panel ID and schedule GUID when the chart remounts
UpdatesThe existing chart remains visible under a blocking overlay while a full schedule response is replaced
ConstraintsSecondary constraints and material movement share one area below the chart: opening one panel closes the other. An open panel is reopened and silently refreshed after a schedule remount
AllocationAn operation dragged from the unscheduled drawer is validated by the adapter, then allocated through the schedule API and replaced by the refreshed response

Panel-owned settings ​

The adapter explicitly owns timezone, locale, terminator visibility, the automatic opening of the constraints panels (showConstraints, showMaterialConstraints), field metadata, date transforms, and safe valueMap transforms. The remaining schedule.* surface is passed to the installed APS package and stays opaque in this guide.

For constraintsTooltipConfig, supplyTooltipConfig, and the three arrow-tooltip sections, settings own field membership. An absent or empty section stays empty. The panel adds date formatting only to an explicitly configured supported date path with no resolved transform function: startDate or finishDate for constraints, date for supplies, and fromOp.startDate, fromOp.finishDate, fromOp.workOrder.dueDate, toOp.startDate, toOp.finishDate, or toOp.workOrder.dueDate for flow arrows. Formatter support does not make a field visible. supplyArrowTooltipConfig and producerArrowTooltipConfig have no verified date-bearing paths, so the panel does not add a date formatter to either section.

Dependency-arrow tooltips ​

Installed @mes/aps@1.23.0 can show a tooltip when the reader hovers a dependency arrow. The Settings API can configure these independent sections:

  • flowArrowTooltipConfig for a solid operation-to-operation arrow. Its fields are scoped with fromOp. and toOp.; each side can use operation fields such as name, startDate, finishDate, and workOrder.dueDate.
  • supplyArrowTooltipConfig for a dashed supply-to-operation arrow. Verified fields include quantity and supplyGuid, plus materialDefinitionName, materialDefinitionItemId, and materialDefinitionUOM of the supply material whose GUID matches the dependency. When the supply in the schedule response has no such material, these three fields have no value.
  • producerArrowTooltipConfig for a dashed producer-operation arrow. Verified fields include materialDefinitionName, materialDefinitionItemId, materialDefinitionUOM, and quantity.

Each configured field accepts the same label, hidden, order, template, and declarative transform contract as the existing tooltip sections. A dot inside an arrow field name is literal, so use bracket escaping in the flat setting key. For example:

text
schedule.flowArrowTooltipConfig.[fromOp.name].label = "From operation"
schedule.flowArrowTooltipConfig.[fromOp.startDate].label = "From start"
schedule.flowArrowTooltipConfig.[fromOp.name].transform.type = "valueMap"
schedule.flowArrowTooltipConfig.[fromOp.name].transform.values.Assembly = "Assembly stage"
schedule.flowArrowTooltipConfig.[toOp.workOrder.dueDate].label = "To order due"
schedule.supplyArrowTooltipConfig.quantity.label = "Required quantity"
schedule.supplyArrowTooltipConfig.supplyGuid.hidden = true
schedule.producerArrowTooltipConfig.materialDefinitionName.label = "Produced material"
schedule.producerArrowTooltipConfig.quantity.order = 20

The panel receives these flat settings with the other schedule.* settings, turns recognized declarative descriptors into APS functions, and passes the resulting sections to createConfig. It never executes JavaScript stored in a setting. For the six configured flow-arrow date paths that have no explicit transform, the panel adds its date-display transform after preserving the configured metadata; it leaves every omitted path absent.

Right-click an operation and choose Выделить последующие операции, Выделить предыдущие операции, or Выделить весь заказ. APS maps these commands to next, previous, or all dependency retrieval respectively. The package supplies the selected operation GUID and a response callback. GanttRenderer adds the command's direction; the schedule store adds the current schedule GUID, maps the selected GUID to operation, and sends POST /Schedule/GetWorkOrderOperationDependencies. The store returns the complete response through the APS callback. No toolbar action or additional panel JSON action is required. When the request succeeds, the panel shows the success notification, and APS draws the returned dependencies as arrows with the configured hover tooltips.

Highlighted-arrow colors ​

Configure the three APS 1.20 color settings under schedule.appSettings.drawPreferences:

SettingPackage defaultApplies to
highlightedArrowColorDefaultblackFlow arrows and trace routes
highlightedArrowColorSupply#06641eSupply arrows
highlightedArrowColorProducer#daa520Producer arrows

highlightedArrowColor is removed. For compatibility, the panel maps that legacy setting only to highlightedArrowColorDefault; an explicit new key wins, including an explicit highlightedArrowColorDefault.

Behavioral model ​

  1. An action opens a schedule and stores its response.
  2. The panel normalizes package-bound date fields and creates the APS config from schedule.* settings.
  3. APS renders the chart. Panel actions call the schedule store; operations that return a full schedule replace the dataset and remount the widget.
  4. The adapter saves the old schedule viewport and restores only the viewport recorded for the new schedule GUID.
  5. showUnscheduledOperations opens the nested drawer. APS owns drag feedback; the panel owns the final allocation request.
  6. toggleSecondaryConstraints and toggleMaterialConstraints open or close an APS constraints panel below the chart. When an APS constraints panel opens, the Gantt panel sends { "scheduleGuid": "<active schedule>" } to POST /Schedule/GetSecondaryConstraints or POST /Schedule/GetMaterialConstraints, shows a success, empty, or error message, and passes the response to that APS constraints panel. If the other APS constraints panel was open, the Gantt panel closes it. After a later schedule remount, the Gantt panel reopens the APS constraints panel that was open and repeats its request without a message.

Alternatives, defaults, and precedence ​

  • schedule.appSettings.timezone: valid explicit setting, then browser IANA timezone, then UTC.
  • schedule.appSettings.locale: configured locale; the current panel defaults to ru-RU.
  • schedule.appSettings.equipmentAreaSettings.showTerminator: defaults to true, but an explicit server setting overrides it.
  • Server settings are mapped from flat schedule.* keys. Panel-owned safe transforms and date transforms are resolved before createConfig.
  • Installed @mes/aps@1.23.0 has no defaults for constraint or supply tooltip fields. Configure each required field explicitly; the panel does not recreate removed package defaults.
  • schedule.showConstraints: true opens the secondary constraints panel, and schedule.showMaterialConstraints: true opens the material movement panel, when the chart becomes ready and the current panel session has no open or closed state for that panel yet. The state is recorded by its toolbar action, by opening the other panel, by closing secondary constraints inside APS, and by an earlier automatic open. If both settings are true, only the secondary constraints panel opens.
  • schedule.materialConstraintsTooltipConfig and schedule.materialConstraintsListInfoConfig are passed to APS unchanged. Both are empty by default in @mes/aps@1.23.0: without schedule.materialConstraintsListInfoConfig, material movement rows have no labels. The panel adds no date formatting or valueMap transforms to them.
  • Other schedule.* keys are opaque @mes/aps configuration. Do not copy an arbitrary package option into application JSON without verifying the installed package.

Limitations ​

  • The panel is not a standalone request surface; without a loaded schedule it has no chart data.
  • schedule.appSettings.timezone participates in display and some APS calculations, while other installed-package paths still use browser-local Date operations. It is not proof of cross-browser determinism.
  • Pre-1900 sentinel supply dates are omitted at the package boundary rather than projected onto an invented date.
  • equipmentInfoConfig and constraintsListInfoConfig are empty by default in the installed APS package. Their field sets must be supplied through verified schedule.* settings when those labels are required.
  • Closing secondary constraints with the close button inside APS updates the toolbar label. Closing material movement the same way is not reported to the panel by @mes/aps@1.23.0: the label keeps the open state, and the next schedule remount reopens the panel. The next toolbar click opens it again.
  • Viewport and constraint visibility are browser-session state, not persisted application configuration.
  • Viewport and visibility intent are keyed by panel ID, but the loaded schedule, chart reference, and constraints data still belong to a singleton schedule store. Independent behavior for multiple simultaneously mounted Gantt panels is therefore unverified; do not treat that ownership question as resolved.

Minimal configuration ​

The smallest valid panel fragment contains only the common identity, variant, and optional action surface.

Panel JSON ​

json
{
  "id": "schedule-gantt",
  "type": "gantt",
  "panelActions": []
}

This fragment is valid, but it becomes useful only after another action loads a schedule.

Scenario: open a schedule and work with the chart ​

json
{
  "version": "1.0.0",
  "panel": {
    "id": "schedule-workspace",
    "type": "group",
    "groupLayout": { "type": "rows", "resizable": true },
    "panels": [
      {
        "id": "schedules",
        "type": "table",
        "request": { "metaTypeName": "Schedule" },
        "columns": [
          { "attribute": "name", "label": "Schedule" },
          { "attribute": "startDate", "label": "Start" }
        ],
        "pagination": { "rowsPerPage": [10] },
        "itemActions": [
          {
            "id": "open-schedule",
            "method": "openSchedule",
            "label": "Open Gantt",
            "setVisibilityVariable": { "schedule-view": "gantt" }
          }
        ]
      },
      {
        "id": "schedule-gantt",
        "type": "gantt",
        "panelActions": [
          {
            "id": "gantt-actions",
            "renderType": "dropdown",
            "label": "Schedule",
            "actions": [
              { "id": "generate-schedule", "method": "generateSchedule", "label": "Generate" },
              { "id": "toggle-calendar-layer", "method": "toggleLayerOrCalendar", "label": "Toggle calendar layer" }
            ]
          }
        ]
      }
    ]
  }
}

Expected result: opening a table row loads the schedule; the Gantt then exposes only actions backed by that active schedule.

Runnable demos ​

Open Gantt with browser-timezone policy Open Gantt with explicit UTC policy

In either fixture, open Gantt → Нераспределённые операции to render the actual Schedule Operations drawer from the loaded schedule's unscheduledOperations rows. Gantt → Показать движение материалов opens the material movement panel with demonstration events for two materials; the demo configures no row labels, and the rows open at the minimum height.

The fixtures verify schedule opening, package rendering, panel actions, the unscheduled drawer, opening the material movement panel with its data, display field transforms, and the two timezone-precedence branches. They do not prove every opaque APS setting, a successful allocation request after dropping a row, or dependency-arrow rendering: the current fixture data contains no dependency response.

Exact parameter reference ​

Next, configure an openSchedule action and verify it with the real schedule API before adding optional APS settings.