Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Gantt Chart

  • Last UpdatedJun 28, 2024
  • 2 minute read

Basic

Property

Scripting Supported

Example

Name

Yes

Writable

Readable

To set the property

control.findById("ID").tagName =
"Value for Name";

To get the value of the property

control.findById("ID").tagName;

XML Node

Yes

Readable

To get the value of the property

control.findById("ID").xmlNodeBoundTo;

Description

Yes

Writable

Readable

To set the property

control.findById("ID").description = "Value for Description";

To get the value of the property

control.findById("ID").description;

Lookup Source

No

Not Applicable

Event State

No

Not Applicable

Event Start Time

No

Not Applicable

Event End Time

No

Not Applicable

Event Name

No

Not Applicable

Event Color

No

Not Applicable

Appearance

Property

Scripting Supported

Script

Visible

Yes

Writable

Readable

To set the property

control.findById("ID").visible = true;

To get the value of the property

control.findById("ID").visible;

Label Position

No

Not Applicable

Label-Control Area

No

Not Applicable

Width

No

Not Applicable

Retain Space

No

Not Applicable

Bar Thickness

No

Not Applicable

Time Period

Yes

To set the property

For Duration

control.findById("Gantt1").ganttDuration = 8;

For Time Range scripting using Text control

If you want to set the Time Range's start and end time properties in the Gantt (G1) control when you enter date and time in the Entered Time (T1) Text control, use the following script for the On Data Change event of the Entered Time (T1) Text control.

// assuming datetime string in "MM/dd/YYYY HH:mm:ss" format

var str = currentValue;

var d = str.split(" ")[0].split("/");

var t = str.split(" ")[1].split(":");

var dateTime = new Date(parseInt(d[2]), parseInt(d[0]), parseInt(d[1]), parseInt(t[0]), parseInt(t[1]), parseInt(t[2]));

var dateTimeUtc = SFU.getDateTimeInServerUTCFormat(dateTime);

control.findByXmlNode("Gantt1").ganttTimeRangeStartTime =SFU.getDateTimeInStringFormat(dateTimeUtc,"MM/dd/yyyy HH:mm:ss");

Note: The Text control date time input is a string with the format specified in the example script above and in UTC. This input is displayed in the Gantt Chart control in your local time.

For Time Range scripting using Date Time control

If you want to set the Time Range's start and end time properties in the Gantt (G1) control when you select date and time in the Entered Time (D1) Date Time control, use this script for the On Data Change event of the Entered Time (D1) Date Time control.

control.findByXmlNode("Gantt1").ganttTimeRangeStartTime = currentValue;

To get the value of the property

For Duration

control.findByXmlNode("Gantt1").ganttDuration;

Duration

Yes

See Time Period.

Show Details Pane

No

Not Applicable

Show Time Range

No

Not Applicable

Title Position

No

Not Applicable

Title

Yes

To set the property

control.findById("ID").ganttTitle="Gantt Chart";

To get the value of the property

control.findById("ID").ganttTitle;

Custom Style Sheet Identifier

No

Not Applicable

Advanced

Property

Scripting Supported

Example

On Click

Yes

For more information see scripting guidelines for On Click.

ID

No

Not Applicable

Enable Refresh

No

Not Applicable

Refresh Rate

No

Not Applicable

Enable Action (1-3)

Yes

To set the property

control.findById("Gantt1").ganttEnableAction1=enable;

To get the value of the property

control.findById("Gantt1").ganttEnableAction1;

Action (1-3)

No

Not Applicable

Scripts

Property

Scripting Supported

Example

Name

Yes

return "Value for Name";

Description

Yes

return "Value for Description";

Visible

Yes

return true;

Value

Yes

return 90;

Action (1-3) Script

Yes

To show the Pop-Up control

var popupCtr =control.findByXmlNode("Popupform1"); SFU.showPopupControl(popupCtr);

To read a value of a Web API response field - "log_id"

var id = data.log_id;

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in