Skip to content

Time scale and zoom ​

English · Русский

Component options for @mes/aps@1.23.0. Prefix scalar Settings names with schedule.; see how to fill in a record.

Horizontal scale ​

Precision is the duration represented by one time division: integer levels 0 (ten years) through 44 (one minute). When data is loaded, the chart fits the schedule into its visible width and replaces precision and barSettings.initialWidth with the fitted values. Fitting requires a nonempty time range and a positive chart width. If even the coarsest step cannot fit the range at minimum width, the chart keeps that step; the whole schedule will not necessarily be visible at once.

barSettings.initialWidth ​

Lower bound for the base division width during initial fitting. A larger value leaves room for fewer divisions and may select a coarser time step. After fitting, the property stores the calculated width for later scaling.

  • Type: number, pixels.
  • Default: 40.
  • This is an initial value, not a fixed final width.

barSettings.maxInitialWidth ​

Limit for the base time-division width chosen during automatic fitting. The visible width is this base multiplied by 1.05 to the power of the precision level; it can exceed this value.

  • Type: number, pixels.
  • Default: 240.

appSettings.availableZoomLevels ​

The slider's precision list, which fitting replaces with levels from the fitted precision through 44. It prevents zooming out beyond the initial fit. The chart owns this value; do not configure it. With no data, an empty list hides the slider.

LevelDivisionLevelDivisionLevelDivision
010 years155 days30150 minutes
15 years164 days312 hours
23 years173 days3290 minutes
32 years182 days331 hour
41 year191 day3445 minutes
56 months2021 hours3530 minutes
65 months2118 hours3625 minutes
74 months2215 hours3720 minutes
83 months2312 hours3815 minutes
92 months248 hours3910 minutes
101 month256 hours405 minutes
113 weeks265 hours414 minutes
122 weeks274 hours423 minutes
137 days28210 minutes432 minutes
146 days293 hours441 minute

A year is 365 days and a month is 30 days. With ru-RU, labels use date and time for minute/hour steps, dates for day/week steps, month/year for months, and year for years. See locale and timezone.

Vertical scale ​

Equipment rows use a discrete height ladder. finite: false equipment can have several operation levels; its full row is correspondingly taller. The chart rebuilds its height ladder after data or area size changes. Its lowest step is the largest row height that fits all equipment, bounded by minSize and the upper step. With many rows, not all may fit even at the lowest step. The upper step is maxSize, limited by the area's height.

precisionYGantt.minSize ​

Lower bound for one equipment level while constructing the height ladder. If the area is smaller than this bound, calculated height can also be smaller.

  • Type: number, pixels.
  • Default: 20.
  • Read once when the chart is created.

precisionYGantt.maxSize ​

Maximum height of one equipment level, also limited by chart area height.

  • Type: number, pixels.
  • Default: 500.
  • Read once when the chart is created.

precisionYGantt.steps ​

Number of vertical zoom slider positions. Values below two cause a ladder construction error.

  • Type: integer, at least 2.
  • Default: 60.
  • Read once when the chart is created.

precisionYConstraints.minSize, precisionYConstraints.maxSize, precisionYConstraints.steps ​

The equivalent options for constraint rows. Secondary and material constraints share one height ladder and slider position.

  • Defaults: 70, 380, 8.
  • Each panel constructs the ladder from its own list, stores it in precisionYConstraints.array, and uses zoomYConstraints. Empty lists retain the previous or initial array.

Values the chart owns ​

  • precisionYGantt.array and precisionYConstraints.array: rebuilt from the bounds and step count.
  • barSettings.ganttHeight and barSettings.constraintsHeight: replaced by ladder values when zoom is first applied.
  • zoomYGantt and zoomYConstraints: reset when the equipment list changes. zoomY is unused.
  • barSettings.baseWidth: recalculated after each scale change.

Example ​

With enough chart height, a 30-pixel lower row bound, 20 slider positions and automatic fitting with base width at most 160 pixels:

json
{
  "precisionYGantt": { "minSize": 30, "steps": 20 },
  "barSettings": { "maxInitialWidth": 160 }
}