Event colors in weekly schedules (AX-3.8)

In AX-3.8, configured events in weekly BooleanSchedules and EnumSchedules display with different colors according to event state (value). Also, as an alternative to the default colors used to display events in these schedule types, you can specify custom colors for the different event states. Different event colors can be particularly useful when using the scheduler view on mobile devices.

NoteCurrently, schedule event colors do not apply to NumericSchedules or StringSchedules.

See the following for related details:

Default event colors for EnumSchedules and BooleanSchedules

By default in AX-3.8 (and without any configuration), events configured in EnumSchedules and BooleanSchedules appear with in the Scheduler view with different colors for different event state values. This is a change from how configured events appear in AX-3.7 and prior EnumSchedules and BooleanSchedules, where all configured events appear with the same greenish color (varying only by state text).

Default AX-3.8 schedule event colors are shown in an example BooleanSchedule (Figure 331) and EnumSchedule (Figure 331).

Figure 331. Default event colors in BooleanSchedule (AX-3.8)


Default event colors in BooleanSchedule (AX-3.8)

As shown above, the default Boolean “true” state (On) is green, and the default Boolean “false” state (Off) is red. Any event configured for null is silver gray.

Figure 332. Default event colors in EnumSchedule (AX-3.8)


Default event colors in EnumSchedule (AX-3.8)

As shown above, the default colors for Enum states using ordinals 0 through 13 use different colors, starting to repeat again at ordinal 14. In addition, any event configured for null is silver gray.

NoteThe “default value” areas of any weekly schedule (including BooleanSchedule and EnumSchedule), always display as white, regardless of the value of the schedule’s Default Output property. Only configured events display using colors. You can see this in examples above, where adjacent “Off” (Boolean) or “0” (Enum) schedule blocks are either colored (configured) or white (default).

Color names

Note that acceptable color names derive from the SVG 1.0 specification. At the time of this document update, a web URL to a sortable table of acceptable color names, along with their associated RGB hex codes, can be found here: http://www.uize.com/examples/sortable-color-table.html

Customizing schedule event colors globally (station-wide)

For an AX-3.8 station, you can globally specify custom schedule event colors for BooleanSchedules and/or EnumSchedules to use, by entering corresponding lexicon keys for the schedule module.

Such lexicon keys use the format:

BooleanSchedule.colors.n=colorNameOrCode [where n is either 0 (false) or 1 (true)], or

EnumSchedule.colors.n=colorNameOrCode [where n is an ordinal integer value, e.g. 0, 1, 2...]

Where you can also specify a null color with TypeSchedule.colors.null=colorNameOrCode See the Color names section.

Example 5. EnumSchedule entries in schedule lexicon

Some entries in the schedule lexicon for EnumSchedules, shown below (and in Lexicon Editor).

EnumSchedule.colors.null=#FFF0F8FF (aliceBlue)

EnumSchedule.colors.0=#FF808080 (gray)

EnumSchedule.colors.1=#FF90EE90 (lightGreen)

EnumSchedule.colors.2=#FF008000 (green)




NoteClick the Color Chooser button when adding or editing lexicon keys for schedule colors, which produces a popup Color Chooser dialog where you can easily choose colors (without knowing codes or names).

Lexicon event color notes

Keep in mind the following when using the lexicon (global) method to customize event colors in BooleanSchedules and EnumSchedules on a AX-3.8 station:

  • After editing and saving the schedule lexicon, if a local station (e.g. Supervisor), you will need to restart that station (and Workbench) before changes become effective.

  • Assign station users the two-character lexicon code, for example, “en” if any English language/U.S. application. This provides support for browser-connected station users running “Web Workbench”, that is the WbApplet. For related details see the “Language” property in section User.

  • Schedule event colors specified will override default event colors on any station that runs on the host with the lexicon changes. In other words, this is not a “station specific” change.

  • If event color changes are to be used by a remote (JACE) host, you typically build a lexicon module with the schedule module changes and install it using the platform Software Manager.

  • BooleanSchedules or EnumSchedules can also have custom event colors specified directly at the component level, using added facets. In this case, these custom event colors override any “global colors” from lexicon keys, in addition to schedule “default colors”.

See the following for related details:

Customizing schedule event colors at the component level

In an AX-3.8 station, you can individually specify custom schedule event colors for BooleanSchedules and/or EnumSchedules to use, by adding additional facets on each schedule. These custom event colors override any colors “globally” sourced from schedule lexicon keys (if applicable), as well as “default colors”.

Customize schedule event colors using facets

To do this, from the property sheet of the EnumSchedule or BooleanSchedule:

  1. Click the Facets control (>>) for the popup Config Facets dialog.



    NoteTypically, you should already have “normal facets” defined, such as “range” facets if an EnumSchedule, or if a BooleanSchedule, “falseText” and “trueText” facets. If not, it is recommended you configure these first.

  2. In the Config Facets dialog, click to add a new facets key, which by default is Key “key”.



  3. Type over “key”, entering: colors, and in the Type drop-down select EnumRange.



  4. Click its Value expand (...) control, and next the (>>) control for the popup Enum dialog, which is initially empty.



  5. As needed, add facet entries for colors by clicking in the left-side (Ordinal) field and entering a numeral, then in the right-side field entering either a color name or color code (see Color names). Then click Add.



    The example above shows colors assigned to three enum states corresponding to ordinals 1, 2, and 3.

    Note

    • In the case of a BooleanSchedule, ordinal 0=false and 1=true.

    • Currently, there is no colors key entry for a configured “null” value. However, you can set a “global” null event color, for either/both BooleanSchedules and EnumSchedules using the lexicon method.

    When finished, click OK, then >>, to close the Enum dialogs.

  6. The Config Facets dialog should reflect the added enum states in the colors key (example below).



    Click OK to return to the schedule’s property sheet, then click Save.

    The new event colors are now immediately effective in this schedule. See Figure 333 for results.

Figure 333. Example custom event color results using facets method in EnumSchedule


Example custom event color results using facets method in EnumSchedule

NoteAgain, only “configured events” show the assigned event color. In the Figure 333 example above, both Sunday and Saturday have the entire day configured as “Off”, while the remaining days of the week only have “Slow” or “Fast” configured events—the “Default Value” (in this case “Off”) always appears as white.

See the following for related details: