new MarkZone(oMarkZones)
The MarkZone object holds the mark-zone of the control. The MarkZone(id) method returns the mark-zone based on its index or identifier/key.
Every option of the MarkZoneOptions type has associated a property of the MarkZone object. For instance, the option:
shape {string}, defines the shape for the mark-zone (applied on the schedule view only)is associated with the property:
Shape {string}, defines the shape for the mark-zone (applied on the schedule view only)which means that the following statements are equivalent:
oMarkZone.Options = {shape: "lime"}where oMarkZone is an object of MarkZone type
oMarkZone.SetOptions({shape: "lime"})
oMarkZone.Shape = "lime"
oMarkZone.SetShape("lime")
Parameters:
| Name | Type | Description |
|---|---|---|
oMarkZones |
MarkZone | Indicates an object of MarkZones type that's the owner collection of this mark-zone. |
Methods
GetCaption() → {any}
The GetCaption() method defines the caption of the mark-zone.
Returns:
Returns the caption of the mark-zone
- Type
- any
GetEnd() → {any}
The GetEnd() method defines the date/time when the mark-zone ends.
Returns:
Returns the date/time when the mark-zone ends
- Type
- any
GetEventShape() → {any}
The GetEventShape() method defines the shape to apply on events that intersect the current mark-zone.
Returns:
Returns the shape to apply on events that intersect the current mark-zone, as one of the following:
- null, no custom-shape is applied on the object (default-shape may be applied instead)
- the shape's name within the exontrol.Shapes.Schedule or exontrol.Shapes namespace
- a CSS color
- a JSON string-representation of an object of exontrol.Def.Shape type, for the mark-zone
- an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
- Type
- any
GetGroupID() → {any}
The GetGroupID() method defines the identifier of the group where the MarkZone object belongs.
Returns:
Returns the identifier of the group where the MarkZone object belongs
- Type
- any
GetIndex() → {any}
The GetIndex() method retrieves the mark-zone's index.
Returns:
Returns the mark-zone's index (0-based)
- Type
- any
Example
The following statements are equivalents:
oMarkZone.GetIndex(), retrieves the mark-zone's index
oMarkZone.Index, retrieves the mark-zone's index
where oMarkZone is an object of MarkZone type
GetIndex
GetKey() → {string}
The GetKey() method returns the mark-zone's key.
Returns:
Returns the mark-zone's key
- Type
- string
GetOptions() → {object}
The GetOptions() method returns the mark-zone's options at once.
Returns:
Returns an object of MarkZoneOptions type
- Type
- object
Example
The following statements are equivalents:
oMarkZone.GetOptions(), returns the mark-zone's options
oMarkZone.Options, returns the mark-zone's options
where oMarkZone is an object of MarkZone type
GetOptions
GetRepetitive() → {any}
The GetRepetitive() method gets the expression to define the repetitive-mark-zone. With a valid Repetitive formula, Start and End specify only the start and end time of the repetitive mark zone, while the Repetitive expression determines all occurrence dates.
Returns:
Returns the expression to define the repetitive-mark-zone
- Type
- any
GetShape() → {any}
The GetShape() method defines the shape for the mark-zone (applied on the schedule view only).
Returns:
Returns the shape for the mark-zone, as one of the following:
- null, no custom-shape is applied on the object (default-shape may be applied instead)
- the shape's name within the exontrol.Shapes.Schedule or exontrol.Shapes namespace
- a CSS color
- a JSON string-representation of an object of exontrol.Def.Shape type, for the mark-zone
- an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
- Type
- any
GetStart() → {any}
The GetStart() method defines the date/time when the mark-zone begins.
Returns:
Returns the date/time when the mark-zone begins
- Type
- any
GetTime() → {any}
The GetTime() method indicates the date/time of the mark-zone (simulates a timer, so time, end and time are identhical).
Returns:
Returns the date/time of the timer
- Type
- any
GetTimeScaleShape() → {any}
The GetTimeScaleShape() method defines the shape for the mark-zone (applied on the time-scale only).
Returns:
Returns the shape for the mark-zone, as one of the following:
- null, no custom-shape is applied on the object (default-shape may be applied instead)
- the shape's name within the exontrol.Shapes.Schedule or exontrol.Shapes namespace
- a CSS color
- a JSON string-representation of an object of exontrol.Def.Shape type, for the mark-zone
- an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
- Type
- any
GetVisible() → {boolean}
The GetVisible() method determines whether the mark-zone is visible or hidden.
Returns:
Returns true if the mark-zone is visible, or false if the mark-zone is not visible
- Type
- boolean
Remove()
The Remove() method removes the mark-zone from the mark-zones collection.
SetCaption(value)
The SetCaption() method sets the caption of the mark-zone.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | Specifies the caption of the mark-zone. |
Example
null {null}, resets the caption of the mark-zone
"caption" {string}, defines the plain-caption for the mark-zone
SetCaption
SetEnd(value)
The SetEnd() method sets the date/time when the mark-zone ends.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | Specifies the date/time when the mark-zone ends, as explained: {null} or {undefined}, indicates the current date and time (equivalent of Date.Now()) {number}, indicates the Jan 1st of the year, such as "Jan 1st 2001" for 2001 {string}, defines the date in string-format as "#MM/DD/YYYY[ HH:mm:ss]#", such as "#10/10/2011 14:48#" or string-format as "YYYY-MM-DDTHH:mm:ss.sssZ" (ISO 8601), such as "2011-10-10" (date-only format), "2011-10-10T14:48:00" (local date-time format), "2011-10-10T14:48:00Z" (UTC date-time format), or "2011-10-10T14:48:00.000+09:00" (date-time format with milliseconds and time zone offset) {Date}, indicates a javascript Date to be copied, such as "Wed, 25 Mar 2015 15:00:00 GMT" for new Date("2015-03-25T15:00:00Z"). |
Example
null {null}, is equivalent of Date.Now()
2001 {number}, is equivalent of Mon, 01 Jan 2001 00:00:00 GMT
"#12/31/1971 13:00#" {string}, is equivalent of Fri, 31 Dec 1971 13:00:00 GMT
new Date("2015-03-25T15:00:00Z"), is equivalent of Wed, 25 Mar 2015 15:00:00 GMT
SetEnd
SetEventShape(value)
The SetEventShape() method sets the shape to apply on events that intersect the current mark-zone.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | The value could be any of the following:
|
Example
null {null}, no custom shape is applied (default object's shape may be applied)
"" {string}, no custom shape is applied (no default object's shape is be applied)
"red" {string}, fills the object's background in red (CSS color)
'{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
"xxx" {string}, indicates that exontrol.Shapes.Schedule.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
SetEventShape
SetGroupID(value)
The SetGroupID() method sets the identifier of the group where the MarkZone object belongs.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | Specifies the identifier of the group where the MarkZone object belongs. |
Example
null {null}, dissociates the mark-zone from any group
0 {number}, moves the mark-zone to the group with the index 0 (0-based)
"G1" {string}, moves the mark-zone to the group with the identifier "G1"
SetGroupID
SetKey(value)
The SetKey() method assigns a new key to the mark-zone.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
string | Specifies a new key to be assigned to the mark-zone. |
Example
"logo" {string}, defines the mark-zone with the giving key (logo). You can use the oSchedule.MarkZone("logo") method to request the mark-zone giving its key.
SetKey
SetOptions(oOptions)
The SetOptions() method changes the mark-zone's options (visibility, caption, ...) at once.
Parameters:
| Name | Type | Description |
|---|---|---|
oOptions |
object | Specifies an object of MarkZoneOptions type that holds information about the mark-zone, such as caption, image and so on. If the oOptions parameter is not-of object type it indicates the mark-zone's caption instead. |
Example
oSchedule.MarkZone(0).Options = {shape: "red", height: 32}, changes the mark-zone's height and background
oSchedule.MarkZone(0).SetOptions({shape: "red", height: 32}), changes the mark-zone's height and background
SetOptions
SetRepetitive(value)
The SetRepetitive() method sets the expression to define the repetitive-mark-zone. With a valid Repetitive formula, Start and End specify only the start and end time of the repetitive mark zone, while the Repetitive expression determines all occurrence dates.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | Specifies the expression to define the repetitive-mark-zone. |
Example
"" {string} or null {null}, the mark-zone is not repetitive (no effect)
"0" {string}, no occurrence
"1" {string}, the mark-zone occurs every day
"weekday(value) = 1" {string}, the mark-zone occurs every Monday
"weekday(value) in (1,2) and month(value) = 6", the mark-zone occurs every Monday and Tuesday, on June only
"value in (#6/8/2012#,#6/11/2012#,#6/20/2012#)", the mark-zone occurs on 6/8/2012, 6/11/2012 and 6/20/2012
"value >= #6/1/2012# and ( (value - #6/1/2012#)/86400000 mod 5 = 0)", the mark-zone starts on 6/1/2012, and shows up every 5 days
SetRepetitive
SetShape(value)
The SetShape() method changes the shape for the mark-zone.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | The value could be any of the following:
|
Example
null {null}, no custom shape is applied (default object's shape may be applied)
"" {string}, no custom shape is applied (no default object's shape is be applied)
"red" {string}, fills the object's background in red (CSS color)
'{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
"xxx" {string}, indicates that exontrol.Shapes.Schedule.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
SetShape
SetStart(value)
The SetStart() method sets the date/time when the mark-zone begins.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | Specifies the date/time when the mark-zone begins, as explained: {null} or {undefined}, indicates the current date and time (equivalent of Date.Now()) {number}, indicates the Jan 1st of the year, such as "Jan 1st 2001" for 2001 {string}, defines the date in string-format as "#MM/DD/YYYY[ HH:mm:ss]#", such as "#10/10/2011 14:48#" or string-format as "YYYY-MM-DDTHH:mm:ss.sssZ" (ISO 8601), such as "2011-10-10" (date-only format), "2011-10-10T14:48:00" (local date-time format), "2011-10-10T14:48:00Z" (UTC date-time format), or "2011-10-10T14:48:00.000+09:00" (date-time format with milliseconds and time zone offset) {Date}, indicates a javascript Date to be copied, such as "Wed, 25 Mar 2015 15:00:00 GMT" for new Date("2015-03-25T15:00:00Z"). |
Example
null {null}, is equivalent of Date.Now()
2001 {number}, is equivalent of Mon, 01 Jan 2001 00:00:00 GMT
"#12/31/1971 13:00#" {string}, is equivalent of Fri, 31 Dec 1971 13:00:00 GMT
new Date("2015-03-25T15:00:00Z"), is equivalent of Wed, 25 Mar 2015 15:00:00 GMT
SetStart
SetTime(value)
The SetTime() method sets the date/time of the mark-zone (simulates a timer, so time, end and time are identhical).
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | Specifies the date/time when the mark-zone begins, as explained: {number}, indicates the Jan 1st of the year, such as "Jan 1st 2001" for 2001 {string}, defines the date in string-format as "#MM/DD/YYYY[ HH:mm:ss]#", such as "#10/10/2011 14:48#" or string-format as "YYYY-MM-DDTHH:mm:ss.sssZ" (ISO 8601), such as "2011-10-10" (date-only format), "2011-10-10T14:48:00" (local date-time format), "2011-10-10T14:48:00Z" (UTC date-time format), or "2011-10-10T14:48:00.000+09:00" (date-time format with milliseconds and time zone offset) {Date}, indicates a javascript Date to be copied, such as "Wed, 25 Mar 2015 15:00:00 GMT" for new Date("2015-03-25T15:00:00Z"). |
Example
null {null}, indicates the current date and time (equivalent of Date.Now())
2001 {number}, is equivalent of Mon, 01 Jan 2001 00:00:00 GMT
"#12/31/1971 13:00#" {string}, is equivalent of Fri, 31 Dec 1971 13:00:00 GMT
new Date("2015-03-25T15:00:00Z"), is equivalent of Wed, 25 Mar 2015 15:00:00 GMT
SetTime
SetTimeScaleShape(value)
The SetTimeScaleShape() method changes the shape for the mark-zone (applied on the time-scale only).
Parameters:
| Name | Type | Description |
|---|---|---|
value |
any | The value could be any of the following:
|
Example
null {null}, no custom shape is applied (default object's shape may be applied)
"" {string}, no custom shape is applied (no default object's shape is be applied)
"red" {string}, fills the object's background in red (CSS color)
'{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
"xxx" {string}, indicates that exontrol.Shapes.Schedule.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
SetTimeScaleShape
SetVisible(value)
The SetVisible() method shows or hides the mark-zone.
Parameters:
| Name | Type | Description |
|---|---|---|
value |
boolean | Indicates a boolean expression that specifies whether the mark-zone is visible or hidden. |
Example
false {boolean}, hides the mark-zone
true {boolean}, shows the mark-zone
SetVisible