API Reference
Namespaces
Classes
Events
Global
Externals

Class: InactivityTimer

CIQ. InactivityTimer


new InactivityTimer(params)

Add-On that puts the chart into "sleep mode" after a period of inactivity.

Requires addOns.js.

In sleep mode, a class "ciq-sleeping" will be added to the body. This will dim out the chart. Sleep mode is ended when interaction with the chart is detected.

Parameters:
Name Type Description
params object

Configuration parameters

Properties
Name Type Argument Description
stx CIQ.ChartEngine <optional>

The chart object

minutes number <optional>

Inactivity period in minutes. Set to 0 to disable the sleep mode.

interval number <optional>

Sleeping quote update interval in seconds. During sleep mode, this is used for the update loop. Set to non-zero positive number or defaults to 60.

wakeCB function <optional>

Optional callback function after waking

sleepCB function <optional>

Optional callback function after sleeping

Since:
  • 3.0.0

Example
new CIQ.InactivityTimer({stx:stxx, minutes:30, interval:15});  //30 minutes of inactivity will put chart into sleep mode, updating every 15 seconds