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

  • A schedule must be loaded into the panel schedule store by openSchedule, getSchedule, or another schedule action.
  • 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.18.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, 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, date formatting, and safe valueMap transforms for operation, constraint, and supply fields
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-constraint visibility is rehydrated after a schedule remount when wrapper session intent says it was open
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, 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.

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.

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.
  • 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.
  • Closing secondary constraints inside APS is not observable by the wrapper, so wrapper intent can temporarily diverge.
  • 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 secondary-constraint 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.

The fixtures verify schedule opening, package rendering, panel actions, the unscheduled drawer, display field transforms, and the two timezone-precedence branches. They do not prove every opaque APS setting or a successful allocation request after dropping a row.

Exact parameter reference

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