Class: TableView

CIQ. TableView


new TableView(params)

Creates an overlay that displays the visible chart data segment as a table.

The overlay includes controls that enable users to copy the table data to the clipboard or download the data as a character-separated values (CSV) file. See TableViewBuilder.dataToCsv for the default separator character.

The table view can be opened using the Alt+K keystroke combination and closed using the Escape key (see the tableView action in hotkeyConfig.hotkeys in js/defaultConfiguration.js).

Parameters:
Name Type Description
params object

Configuration parameters.

Properties
Name Type Argument Default Description
stx CIQ.ChartEngine

A reference to the chart engine that contains the chart for which the table view is created.

minColumnWidth string <optional>
"84px"

The minimum width (including units) of the table columns. Note: The units can be any CSS unit acceptable by the CSS calc function.

coverUIMaxWidth number <optional>
400

The chart width (in pixels) below which the table view covers the entire chart, including user interface elements (symbol input field, menus, etc.). For example, if the value of this parameter is 1000, the table view covers the entire chart area if the chart width is <= 999 pixels.

coverContainer string <optional>

A CSS selector used to obtain the DOM element that ultimately contains the table view; for example, ".chartContainer".

usePreviousCloseForChange boolean <optional>
true

Indicates whether the closing price of the previous data point should be used instead of the opening price of the current data point to determine the amount of change for the current data point; that is, (current close - previous close) or (current close - current open).

Since:
  • 8.1.0

Example
new CIQ.TableView({ stx: stxx });

Members


<static> this.builder :TableViewBuilder

A reference to the TableViewBuilder namespace for access to the namespace static methods.

Type:
Since:
  • 8.1.0


<static> this.coverContainer :string

A CSS selector used to obtain the DOM element that hosts the table view.

Type:
  • string
Since:
  • 8.1.0


<static> this.coverUIMaxWidth :number

The chart width in pixels below which the table view covers the entire chart, including user interface elements, such as the menus and footer.

Type:
  • number
Since:
  • 8.1.0


<static> this.minColumnWidth :string

Minimum width of the table view columns, including units. The units can be any CSS unit acceptable by the CSS calc function.

Type:
  • string
Since:
  • 8.1.0


<static> this.stx :CIQ.ChartEngine

The chart engine instance that contains the chart for which the table view is created.

Type:
Since:
  • 8.1.0


<static> this.usePreviousCloseForChange :boolean

If true, the closing price of the previous data point is used instead of the opening price of the current data point to determine the amount of change for the current data point.

Type:
  • boolean
Since:
  • 8.1.0


<static> this.viewAdditionalColumns :boolean

Toggle to display and hide additional table view columns, such as % Change and Volume.

Note: Data in the additional columns might not be present in the chart view because the data is calculated (for example, % Change) or is not part of the standard chart display (for example, Volume — which can be displayed with the Volume Chart study).

Type:
  • boolean
Since:
  • 8.1.0

Methods


close( [notify])

Closes the table view.

Parameters:
Name Type Argument Default Description
notify boolean <optional>
true

Indicates whether the onClose callback function is set (see open).

Since:
  • 8.1.0


open( [params])

Displays the table view.

Parameters:
Name Type Argument Description
params object <optional>

Configuration parameters.

Properties
Name Type Argument Description
config object <optional>

Table column information.

onClose function <optional>

Callback function to execute on closing the table view. The callback enables synchronization of state in the application when the table view is closed.

Since:
  • 8.1.0


subscribeToChanges(uiContext [, channelPath])

Subscribes to changes in the table view component communication channel, which enables other components to open and close the table view.

Parameters:
Name Type Argument Description
uiContext CIQ.UI.Context

The user interface context of the table view. Provides the communication channel path that identifies the table view channel.

channelPath string <optional>

Specifies the channel path if the path is not available in the context configuration provided by uiContext.

Since:
  • 8.1.0


toggle()

Opens the table view if it is closed. Closes the table view if it is open.

Since:
  • 8.1.0