1.3.2. Timespans
Â
Overview
Timespans are background events that can be added to the component for either a specific resource or for all resources. Unlike events, timespans are not clickable and events will be rendered on top of them.
This feature provides a way to display important information in the background of the scheduling component without interfering with event interactions. For example, timespans could be used to indicate holidays or maintenance periods that affect resource availability.
For an example see: timespans
Implementation
Once the event menu feature has been enabled, you can begin configuring the feature. At a minimum, a datasource, start date, and end date are required. To assign a timespan to a specific resource, you can provide the resource ID attribute.
Please note that the resource ID attribute can be left empty. If it's empty, it will be assigned to all rows. This allows you to use a single datasource for timespans that should cover all rows, as well as timespans that should be assigned to a particular resource.
Also note that the name for the timespan is not required.
Styling
There are various ways to style a timespan: by using a dynamic class or by using the default styles included in the widget.
Using the default styling options
The default timespan color can be chosen and then overridden by the timespan color, if desired. The timespan color can also be left blank. If left blank, the default timespan color will be applied. To apply a timespan color, you can use a string or the provided enumeration ENUM_Color
found in the resources folder of the scheduler module. Like so:
getKey(BizzomateScheduler.ENUM_Color.cyan)
Or when you have an attribute on your object that uses the color enum:
getKey($currentObject/TimespanColor)
Using a dynamic class to style your timespans
Any class can be defined to style your timespans. In the themefolder of the scheduler are two sample classes you could use for reference: timespan-type--example-1
and timespan-type--example-2
.
Â