Class: Chart

CIQ.ChartEngine. Chart


new Chart()

Defines an object used for rendering a chart and is automatically created by the CIQ.ChartEngine. Chart objects contain the data and config for each chart but they don't actually exist on the screen until a panel is attached. A chart object is attached to both the main chart panel and any related study panels so they can share the same chart data.

Example: stxx.panels['chart'].chart

Example: stxx.chart (convenience shortcut for accessing the main chart object - same as above)

Example stxx.panels['Aroon (14)'].chart

Members


allowScrollFuture :boolean

If set to false, the chart will be anchored on right side preventing white space to be created beyond the newest tick. If both CIQ.ChartEngine.Chart#allowScrollPast and CIQ.ChartEngine.Chart#allowScrollFuture are set to false, allowScrollFuture will take precedence if the candle is manually set to create space, but automated zoom operations (CIQ.ChartEngine#zoomOut) will maintain both scroll restrictions.

Type:
  • boolean
Default Value:
  • true

allowScrollPast :boolean

If set to false, the chart will be anchored on left side preventing white space to be created past the oldest tick. If both CIQ.ChartEngine.Chart#allowScrollPast and CIQ.ChartEngine.Chart#allowScrollFuture are set to false, allowScrollFuture will take precedence if the candle is manually set to create space, but automated zoom operations (CIQ.ChartEngine#zoomOut) will maintain both scroll restrictions.

The amount of white space allowed on the right will be limited by CIQ.ChartEngine#minimumLeftBars

Type:
  • boolean
Default Value:
  • true

dataSegment :array

Contains the segment of the data set that is displayed on the screen (view-window). See the Data Integration tutorial for details.

Type:
  • array

dataSet :array

Contains the current complete data set created by CIQ.ChartEngine#createDataSet, adjusted for periodicity and with calculated studies. See the Data Integration tutorial for details.

Type:
  • array

decimalPlaces :Number

Maximum number of decimal places in data set. Computed automatically by calculateTradingDecimalPlaces

Type:
  • Number

defaultChartStyleConfig :object

For chart types which have configuration settings (such as the aggregate charts renko, kagi, etc) contains those default settings. This object holds the settings for the current chart type only.

Type:
  • object
Since:
  • 3.0.0
Default Value:
  • {}

defaultPlotField :string

For line and mountain type charts set this to a value other than "Close" to have those chart types plot a different field.

Type:
  • string
Since:
  • 3.0.0
Default Value:
  • Close

gaplines :object

READ ONLY. Gap filling style for the chart (line/mountain chart types only). Set by using CIQ.ChartEngine#setGapLines.

Type:
  • object
Since:
  • 4.0.0

hideDrawings :boolean

Set to true to temporarily hide drawings

Type:
  • boolean

includeOverlaysInMinMax :boolean

Set this to true to include the chart overlay values in the calculation to determine the high and low values for the chart.

Type:
  • boolean
Since:

  • • 2016-12-01.4.13
    • 3.0.10 switched default to true
Default Value:
  • true

legendRenderer :function

Function used to render the Legend when multiple series are being displayed on the main chart panel. Update your prototype or a specific chart instance, if you want to use a different rendering method for legend. See CIQ.drawLegend for details and function signature.

Defaults to CIQ.drawLegend

Type:
  • function
Since:
  • 07/01/2015
Example
stxx.chart.legendRenderer = yourFunction; // must follow the function signature of CIQ.drawLegend;

lineApproximation :boolean

When candleWidth<1, setting to true will create approximation of a line chart to improve rendering performance.

Must allow for smaller candle sizes by lowering CIQ.ChartEngine#minimumCandleWidth and allow for larger dataset by increasing CIQ.ChartEngine#maxDataSetSize or setting it to 0.

Type:
  • boolean
Since:
  • 4.1.0
Default Value:
  • true

lineStyle :object

READ ONLY. Style for the line chart. Set by using CIQ.ChartEngine#setLineStyle.

Type:
  • object
Since:
  • 4.0.0

lockScroll :boolean

Set this to true to turn off auto-scrolling when fresh data comes in. By default, the chart will scroll backward whenever a new bar comes in, so as to maintain the chart's forward position on the screen. If lockScroll is true then fresh bars with advance the chart forward (and eventually off the right edge of the screen)

Note that setSpan({base:"today"}) will set an internal variable that accomplishes the same thing. This is a unique case.

Type:
  • boolean
Since:
  • 05-2016-10

masterData :array

The master data for this chart. This data is never modified by the chart engine itself and should not be altered directly. Use CIQ.ChartEngine#setMasterData , CIQ.ChartEngine#appendMasterData to manipulate this object. See the Data Integration tutorial for details.

Type:
  • array

maxTicks :Number

Will contain the maximum number of bars that can be displayed on the chart. This number is auto-computed by the ChartEngine when the user zooms or the size of the chart changes. Since charts can pan slightly off the edge of the screen, this number is width/candleWidth + 2 in order allow partial candles to be displayed on both edges.

Type:
  • Number

scroll :number

Current number of ticks scrolled in from the end of the chart. Setting to zero would theoretically cause the chart to be scrolled completely to the left showing an empty canvas. Setting to 10 would display the last 10 candles on the chart. Setting to maxTicks would display a full screen on the chart (assuming enough data is available).

Type:
  • number

scrubbed :array

Contains a copy of the dataSet, scrubbed for null entries (gap dates). This is used by studies to avoid gaps being interpreted as "zero" values and throwing off calculations.

Type:
  • array

segmentImage :array

Contains data pertaining to variable width candles, used to determine location of bars on the screen

Type:
  • array

series :object

Contains information about the series that are associated with the chart. Series are additional data sets, such as used for comparison charts. Note that a series may have a different y-axis calculation than the price chart. See the "parameters" section of CIQ.ChartEngine#addSeries for details

Type:
  • object

seriesRenderers :object

Contains "renderers" that are used to create the visualizations for series.

Type:
  • object

symbol :string

The current symbol for the chart

Type:
  • string

symbolDisplay :string

Set this to presnet an alternate name for the symbol on the chart label and comparison legend. You can set stxx.chart.symbolDisplay='yourName'; right before calling newChart(). Alternatively, a good place to set it is in your fetch() function, if using CIQ.QuoteFeed. See example.

Type:
  • string
Example
// on your fetch initial load add the following
params.stx.chart.symbolDisplay='yourName for '+params.symbol;

symbolObject :object

The current symbolObject for the chart. Generally this is simply {symbol: symbol}. This is initialized by CIQ.ChartEngine#newChart.

Type:
  • object

tension :object

Set to a value between 0 and 1 to soften the curves on a line or mountain chart.

Type:
  • object

xAxis :CIQ.ChartEngine.XAxis

Contains the {@CIQ.ChartEngine.XAxis} object for the chart.

Type:

xaxis :Array

Contains data entries for the full xaxis, including entries for "future" bars that are displayed on the chart. floatDate and headsUp use these values for display to the user. It is a superset of dataSegment.

Type:
  • Array

xaxisFactor :number

Determines at which zoom level interior axis points are displayed. Value in pixels.

Type:
  • number
Default Value:
  • 30

yaxisPaddingLeft :number

How much padding to leave for the left y-axis. Default is enough for the axis. Set to zero to overlap y-axis onto chart.

Type:
  • number
Since:
  • 07/01/2015

yaxisPaddingRight :number

How much padding to leave for the right y-axis. Default is enough for the axis. Set to zero to overlap y-axis onto chart.

Type:
  • number
Since:
  • 07/01/2015