Actions and events

<< 点击显示目录 >>

主页  mappView帮助助手 > mapp View帮助信息 > Widgets  > Chart  > OnlineChartHDA  >

Actions and events

The following section describes the possible actions and events for the widget.

Actions

Name

Description

Arguments

Results

SetVisible

Controls the visibility of the widget.

value: Boolean

Visible if the value is true. Otherwise, invisible.

 

SetEnable

Controls the usability of the widget.

value: Boolean

Enabled if the value is true. Otherwise, disabled.

 

SetStyle

Sets a predefined style for the widget.

value: StyleReference

 

Freeze

Ends the graph data update and makes it possible to use the zoom and scroll functions.

 

 

ScrollDown

Scrolls down 25%.

To do this, the widget must be in freeze mode.

 

 

ScrollUp

Scrolls up 25%.

To do this, the widget must be in freeze mode.

 

 

ScrollLeft

Scrolls 25% to the left.

To do this, the widget must be in freeze mode.

 

 

ScrollRight

Scrolls 25% to the right.

To do this, the widget must be in freeze mode.

 

 

ScrollXAxis

Scrolls the x-axis by the specified offset value in seconds.

If a negative number is given to the offset value, it is possible to scroll back to the historical data.

This action prevents scrolling outside the limits (start: first data point timestamp, end: freeze time).

If the offset value is not possible, the reason can be checked in result.

result= 0: The offset specification is OK.

result= 1: The start time is before the first data point timestamp.

result= 2: The end time is after the freeze time.

xAxisId: PropertyCollectionReference

offset: Number

result: Number

SetCursorStyle

Applies a predefined style for the cursor collection.

cursorId: PropertyCollectionReference

value: StyleReference

 

SetGraphStyle

Sets a predefined style for the graph collection.

graphId: PropertyCollectionReference

value: StyleReference

 

SetGraphVisible

Controls the visibility of the graph collection that is specified as an argument.

graphId: PropertyCollectionReference

value: Boolean

Visible if the value is true. Otherwise, invisible.

 

SetXAxisStyle

Applies a predefined style for the x-axis collection.

xAxisId: PropertyCollectionReference

value: StyleReference

 

SetXAxisTime

Defines the start and end time from the x-axis in freeze mode.

The time must be specified in UTC time.

This action prevents setting time specifications outside the limits (start: first data point timestamp, end: freeze time).

If the time specifications are not possible, the reason can be checked in result.

result= 0: The time specifications are OK.

result= 1: The start time is before the first data point timestamp.

result= 2: The end time is after the freeze time.

result= 3: The states from results 1 and 2 occur.

result= -1: End time Start time

If the time span is set using action SetXAxisTimeSpan, the time specifications are overwritten.

xAxisId: PropertyCollectionReference

start: DateTime

end: DateTime

result: Number

SetXAxisTimeSpan

Defines the visible time window of the x-axis in seconds.

If the time span is set using action SetXAxisTime, the set time window (timespan) is overwritten.

xAxisId: PropertyCollectionReference

timeSpan: UNumber

 

SetXAxisVisible

Controls the visibility of the x-axis collection, which is specified as "argument".

xAxisId: PropertyCollectionReference

value: Boolean

Visible if the value is true. Otherwise, invisible.

 

SetYAxisStyle

Sets a predefined style for the y-axis collection.

yAxisId: PropertyCollectionReference

value: StyleReference

 

SetYAxisVisible

Controls the visibility of the y-axis collection, which is specified as "argument".

yAxisId: PropertyCollectionReference

value: Boolean

Visible if the value is true. Otherwise, invisible.

 

SetZoomType

Defines on which axis zooming is enabled.

zoomType: ChartZoomType

 

ShowTooltip

Mode "Tooltip" can be enabled using this action. When enabled, a tooltip indicator appears inside the widget. For this, a text must be configured in property "Tooltip". This text is displayed when the indicator is selected. Any other operation of a widget terminates mode "Tooltip".

 

 

Unfreeze

Restarts the update of the graph data and prevents the zoom and scroll functions.

 

 

ZoomIn

Zooms in the graph by 20%.

To do this, the widget must be in freeze mode.

 

 

ZoomOut

Zooms out the graph by 20%.

To do this, the widget must be in freeze mode.

 

 

ZoomReset

Resets the zoom to 0%.

To do this, the widget must be in freeze mode.

 

 

Focus

Sets the focus to the widget when keyboard operation is enabled.

 

 

Table: Actions

Reading actions

To obtain the result of a reading action, an "operand" must be used. For more information, see here. For how the result can be used in the ResultHandler, see here.

Name

Description

Results

GetStatus

This action is used to determine whether the graph is in freeze mode.

If true is returned, freeze mode is not active.

result: Boolean

Table: Reading actions

Events

Name

Description

Arguments

Click

Triggered when clicking on the widget.

origin: String

"origin" contains the ID of the widget that triggers the click event.

horizontalPos: String

horizontalPos contains the horizontal position of event "Click" in pixels (e.g. 10px starting from the viewport).

verticalPos: String

verticalPos contains the vertical position of the click event in pixels (e.g. 10px starting from viewport).

DisabledClick

Triggered when clicking on the disabled widget.

origin: String

"origin" contains the ID of the widget that triggers the click event.

hasPermission: Boolean

"hasPermission" defines whether the current user has the necessary rights to access it.

horizontalPos: String

horizontalPos contains the horizontal position of the DisabledClick event in pixels (e.g. 10px starting from viewport).

verticalPos: String

verticalPos contains the vertical position of the DisabledClick event in pixels (e.g. 10px starting from viewport).

EnableChanged

Triggered when the usability of the widget is changed. This can be changed using various options:

1) Using property enable (binding or via widget action SetEnable)

2) Using property permissionOperate

3) Using usability properties (enable, permissionOperate, OPC UA variable) of the surrounding container widget

4) Using a bound OPC UA variable with write permissions that have been changed.

value: Boolean

"value" returns the new value of property "enable".

VisibleChanged

Triggers when the visibility of the widget is changed. This can be changed using various options:

1) Using property visible (binding or via widget action SetVisible)

2) Using property permissionView

3) Using the visibility properties (visible, permissionView) of the surrounding container widget

value: Boolean

"value" returns the new value of property "visible".

OnDragEnter

Triggers when a dragged widget is moved over the target widget.

widgetId: String

"widgetId" contains the ID of the widget that performed the drag operation.

contentId: String

"contentId" contains the ID of the piece of content whose widget performed the drag operation.

OnDragLeave

Triggers when a dragged widget is dragged away from the target widget.

widgetId: String

"widgetId" contains the ID of the widget that performed the drag operation.

contentId: String

"contentId" contains the ID of the piece of content whose widget performed the drag operation.

OnDrop

Triggers when a dragged widget is released on the target widget. For the definition of drag-and-drop and an explanation of how these events can be used, see here.

widgetId: String

"widgetId" contains the ID of the widget that performed the drag operation.

contentId: String

"contentId" contains the ID of the piece of content whose widget performed the drag operation.

FocusIn

Triggered when a widget gets the focus.

 

FocusOut

Triggered when a widget loses focus.

 

Table: Events