%HI_SetGraphTimeZone function


Function
The function %HI_SetGraphTimeZone allows to define time zones for special modes.
Declaration
 %HI_SetGraphTimeZone(
 INT in _refId,
 INT in _zoneId,
 TIME in _od,
 TIME in _do
 [, INT in _lineNr]
 )
Parameters
_refIdReference to graphic object (reference variable).
_zoneIdIdentifier of zone, number from 1,..n.
_odBeginning of time zone.
_odEnd of time zone.
_lineNr

Zone rendering can be assigned to a specific line. Used only when drawing a graph for a given line.

The default value of 0 disables use for a particular waveform, and band drawing is used for all waveforms.

Description
The function allows to define time zones for special modes (coloration and hiding).
Example
 ENTRY  TimeZones_OnClick
 TIME _gbt
  TIME _get
 
 _get := %NextTime(3600, 3600, 0)
 _gbt := %SubTime(_get,8*3600)
 
 %HI_SetGraphTimes(_Graph, _gbt, _get, @TRUE)
 %HI_SetGraphTimeZone(_Graph,1, %AddTime(_gbt,%StrToRelTime("01:00:00")), %AddTime(_gbt,%StrToRelTime("02:00:00")))
 %HI_SetGraphTimeZone(_Graph,2, %AddTime(_gbt,%StrToRelTime("03:00:00")), %AddTime(_gbt,%StrToRelTime("04:00:00")))
 %HI_SetGraphTimeZone(_Graph,3, %AddTime(_gbt,%StrToRelTime("05:00:00")), %AddTime(_gbt,%StrToRelTime("06:00:00")))
 %HI_SetGraphTimeZoneColor(_Graph,1, %MakeRGB(0, 127, 0))
  %HI_SetGraphTimeZoneColor(_Graph,3, %MakeRGB(255, 0, 0))
 %HI_SetGraphTimeZoneVisible(_Graph,2, @FALSE)
  
 END TimeZones_OnClick
Note
Zones which are not defined by time range have a value zoneId= 0. To speed up the entering of large number of time zones, lock a graph by the function %HI_LockUpdate before entering, and after completion, unlock it.
Napíšte komentár