Q4Widgets API Documentation

q4.ttChart

A Highcharts replacement for Ticker Tech style 5-year stock charts.
Script link
q4.ttchart.1.3.2.min.js
Source file
q4.ttchart.js, line 2
Requires

Options

url string
The base URL of the Q4 website. If the widget is on the same site, this can be blank.
Example
//feeds.q4websystems.com
usePublic boolean
Whether to use public feeds for data. This requires the `apiKey` option.
Default value
false
apiKey string
The Q4 API key. Required if `usePublic` is `true`, otherwise ignored.
exchange string
The stock exchange to use. If this is not specified, the widget will look for `?Indice=EXCH:SYM` in the URL.
symbol string
The stock symbol to use. If this is not specified, the widget will look for `?Indice=EXCH:SYM` in the URL.
compareStocks Array.<string>Array.<object>
An array of stocks to compare to. Can be a string in the format `EXCHANGE:SYMBOL`, or an object with these properties: - `exchange` The stock exchange. - `symbol` The stock ticker symbol. - `name` An optional display name. Defaults to `[exchange]:[symbol]`.
stockNames Object
A list of friendly names for stocks, indexed to their exchange and symbol.
Default value
{"undefined":"Russell 2000"}
compareInput string
A selector for one or more form fields for other stocks to compare against. This is only used when redrawing the chart after clicking the `trigger` element. This can be a text field, a dropdown, or a set of checkboxes or radio buttons. Stocks should be in the format `EXCHANGE:SYMBOL`.
Example
'.compare'
compareTriggerOnChange boolean
Whether to redraw the chart immediately when the `compareInput` field changes. Otherwise the `trigger` element must be clicked to trigger a redraw.
Default value
true
autocompleteInput string
A selector for a form field for a comparison stock, which will autocomplete using a list of companies from the Q4 API.
Example
'.customStock'
autocompleteToken string
A token string for the Q4 company API.
autocompleteLoadingClass string
A CSS class to add to the widget while autocomplete data is loading. This can be used to show and hide elements within the widget.
Example
'autocomplete-loading'
chartByChange boolean
Whether to graph each stock by price, or by % change from the starting date. The change option is useful for comparing multiple stocks.
Default value
false
chartByInput string
A selector for a form field dictating whether to chart by price or by % change. This is only used when redrawing the chart after clicking the `trigger` element. Possible values are `price` or `change`; the default value is `price`. This can be a dropdown, or a set of checkboxes or radio buttons. Since this is a single value, only the last dropdown or checked input matching this selector will be used.
Example
'.chartBy'
chartByTriggerOnChange boolean
Whether to redraw the chart immediately when the `chartByInput` field changes. Otherwise the `trigger` element must be clicked to trigger a redraw.
Default value
true
trigger string
A selector for a trigger element that will redraw the chart when clicked.
Example
'.trigger'
chartContainer string
An optional selector for the stock chart. If not specified, the root element will be used.
Example
'.chart'
navigator boolean
Whether to show the navigator pane below the chart.
Default value
false
tooltip boolean
Whether to show a tooltip when hovering over the chart.
Default value
false
highstockOpts Object
A set of options to pass directly to Highstock.