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.
Currently, schedule event colors do not apply to NumericSchedules or StringSchedules.
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).
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.
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.
The "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).
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).
Click 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.
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".
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:
Typically, 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.
The example above shows colors assigned to three enum states corresponding to ordinals 1, 2, and 3.
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.
Again, 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.