Class: TimeSpanEventPanel

CIQ. TimeSpanEventPanel


new TimeSpanEventPanel(params [, loadSample])

The Time Span Event panel that will contain and display all the time span events created by the user.

Parameters:
Name Type Argument Description
params Object

Configuration parameters.

Properties
Name Type Argument Default Description
stx CIQ.ChartEngine

The chart object.

menuItemSelector string

The selector used to identify menu items for selecting time span events.

height number <optional>
150

Height of the Time Span Event panel.

loadSample boolean <optional>

If true, load the built-in time span event sample.

Since:
  • 7.2.0
Example

Declare a time span event panel and enable/disable using commands to be triggered from a menu.

var stxx = new CIQ.ChartEngine({ container: $$$(".chartContainer") });

// Instantiate the time span event panel.
new CIQ.TimeSpanEventPanel({ stx: stxx, height: 150 });

// To display the panel from a menu, use:
stxx.layout.timeSpanEventPanel = true; // Show the panel.
stxx.changeOccurred("layout"); // Signal the change to force a redraw.

// To hide the panel from a menu, use:
stxx.layout.timeSpanEventPanel = false; // Hide the panel.
stxx.changeOccurred("layout"); // Signal the change to force a redraw.

Methods


<static> this.display()

Creates and displays the panel or destroys the panel depending on the state.

Since:
  • 7.2.0

<static> this.removeChartArtifacts(type)

Helper function to remove all the injection and markers from the main chart

Parameters:
Name Type Description
type string

the type of marker that needs its injections and markers removed

Since:
  • 7.2.0

<static> this.removeTimeSpanEvent(type)

Removes a time span event on the panel.

Parameters:
Name Type Description
type String

The type of time span event to remove from the panel. Ex: "News", "CEO", etc.

Since:
  • 7.2.0

<static> this.renderTimeSpanEvent(spanEvent)

Takes the selected event data and makes Time Span Event markers.

Parameters:
Name Type Description
spanEvent Object

Object that defines the time span event.

Properties
Name Type Description
type String

The type of time span event to display and the basis to identify each individual marker; for example, "News", "CEO", etc.

events Array.<Object>

The data that drives the markers. See Time Span Event tutorial on how to format the data.

spanType String

One the three types that will determine how the time span marker is drawn: spanEvent, durationEvent, singleEvent.

spacingModifier Number

A number that determines how much space to draw between time span event marker rows. Can be configured by adjusting the SPACING constant.

Since:
  • 7.2.0

<static> this.showTimeSpanEvent(spanEvent, preLoad)

Displays a time span event on the panel.

Parameters:
Name Type Description
spanEvent Object

Object that defines the time span event.

Properties
Name Type Description
type String

The type of time span event to display and the basis to identify each individual marker; for example, "News", "CEO", etc.

events Array.<Object>

The data that drives the markers. See Time Span Event tutorial on how to format the data.

spanType String

One the three types that will determine how the time span marker is drawn: spanEvent, durationEvent, singleEvent

preLoad boolean

the eventData already exists, usually when time span event data is loaded before the panel is active

Since:
  • 7.2.0