Appearance
Time scale and zoom
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.
| Level | Division | Level | Division | Level | Division |
|---|---|---|---|---|---|
| 0 | 10 years | 15 | 5 days | 30 | 150 minutes |
| 1 | 5 years | 16 | 4 days | 31 | 2 hours |
| 2 | 3 years | 17 | 3 days | 32 | 90 minutes |
| 3 | 2 years | 18 | 2 days | 33 | 1 hour |
| 4 | 1 year | 19 | 1 day | 34 | 45 minutes |
| 5 | 6 months | 20 | 21 hours | 35 | 30 minutes |
| 6 | 5 months | 21 | 18 hours | 36 | 25 minutes |
| 7 | 4 months | 22 | 15 hours | 37 | 20 minutes |
| 8 | 3 months | 23 | 12 hours | 38 | 15 minutes |
| 9 | 2 months | 24 | 8 hours | 39 | 10 minutes |
| 10 | 1 month | 25 | 6 hours | 40 | 5 minutes |
| 11 | 3 weeks | 26 | 5 hours | 41 | 4 minutes |
| 12 | 2 weeks | 27 | 4 hours | 42 | 3 minutes |
| 13 | 7 days | 28 | 210 minutes | 43 | 2 minutes |
| 14 | 6 days | 29 | 3 hours | 44 | 1 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 useszoomYConstraints. Empty lists retain the previous or initial array.
Values the chart owns
precisionYGantt.arrayandprecisionYConstraints.array: rebuilt from the bounds and step count.barSettings.ganttHeightandbarSettings.constraintsHeight: replaced by ladder values when zoom is first applied.zoomYGanttandzoomYConstraints: reset when the equipment list changes.zoomYis 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 }
}