Q4Widgets API Documentation

q4.indexDividends

Add a dividends table to your website
Script link
q4.index-dividends.1.0.5.min.js
Source file
q4.index-dividends.js, line 2
Requires

Options

url
Domain name where api exists
stock Array.<string>
The Stock Exchange the corresponding `symbol` belongs to, in the following format: 'Exchange:Symbol'. If a custom name should be used visibly on the site, list this after the value. This will load the data using the first string, but allow you to control the appearance of the exchange/symbol text that is rendered using the second string.
Example
stock: ['NYSE:GDDY']
Example
stock: ['NYSE:GDDY', 'CoolExchangeName:CoolSymbolName']
usePublic boolean
Set to true to use outside the Q4 platform requires `apiKey` and `url`
apiKey string
The Q4 API key. Required if `usePublic` is `true`, otherwise ignored.
pageSize interger
All items will be loaded, this options will only limit the rendered results
dateFormat string
A date format string to use with jQuery UI's Datepicker.
Default value
m/d/yy
sortAscending boolean
Whether to sort items in ascending chronological order.
Default value
false
yearSelect string
A CSS selector for a year select element.
Default value
null
yearTemplate string
A Mustache.js template for a single year rendered within the yearSelect element.
Default value
'<option value="{{year}}">{{year}}</option>'
itemContainer string
A CSS selector for the items container.
Default value
null
itemTemplate string
If itemContainer is defined, the template used to render each dividend year. The following template data is available:
{{year}}
{{yearlyDividend}}
{{Code}}
{{Currency}}
{{DeclaredDate}}
{{DividendAmount}}
{{ExDate}}
{{PayDate}}
{{PaymentFrequency}}
{{RecordDate}}
{{Type}}
itemLoadingMessage string
A message or HTML string to display while first loading the dividend year items.
Default value
'<p class="module_loader"><i class="q4-icon_spinner"></i><span class="sr-only">Loading items...</span></p>'
itemNotFoundMessage string
A message or HTML string to display in the itemContainer if no items are found.
Default value
<div class="col-xs-12"><p><strong>No dividends found.</strong></p></div>
startYear interger
startYear of the dividend table, takes first data point if not declared.
Default value
null
endYear interger
End year of the dividend table, takes last data point if not declared.
Default value
new Date().getFullYear() - 1
fixedDecimalPoints interger
The amount of decimal points for the dividend amount
Default value
2
renderChart boolean
If set to true, a Highchart will be rendered to the `chartContainer` using `chartTpl`.
Default value
true
renderCalculator boolean
Renders a basic calculator that will use the most recent dividend `calculatorTpl`
Default value
true
renderCurrentDividends boolean
Renders dividends for the current year `currentDividendTpl`
Default value
true
renderPastDividends boolean
Renders dividends for past years `pastDividendTpl`
Default value
true
chart object
Basic chart configuration options
chart: {
 id: 'chart',
 color: '66, 139, 202',
 colorSpecial: '26, 188, 156',
 title: 'Common Equity Dividends',
 type: 'column',
 xAxisText: 'Payout Period/Date',
 yAxisText: 'Actual Dividend Paid',
 standardSeriesName: 'Common Equity Dividend ($)',
 specialSeriesName: 'Special Dividend ($)',
 drillUpText: '◁'
},
template
The "master" template to be appended onto the page. If `groupByYears` is set to true, this template will render for each year. The following data is available:
{{Code}}
{{Currency}}
{{DeclaredDate}}
{{DividendAmount}}
{{ExDate}}
{{PayDate}}
{{PaymentFrequency}}
{{RecordDate}}
{{Type}}
loadingClass string
A CSS class to add to the widget while data is loading. This can be used to show and hide elements within the widget.
loadingMessage string
A message or HTML string to display while first loading the widget.
Default value
'<p class="module_loader"><i class="q4-icon_spinner"></i><span class="sr-only">Loading items...</span></p>'
beforeBuildChart function
A callback that fires before the chart is built.
Parameters
event Event
The event object.
templateData Object
The complete template data.
beforeRender function
A callback that fires before the full widget is rendered.
Parameters
event Event
The event object.
templateData Object
The complete template data.
itemsComplete function
A callback that fires after yearly items are rendered.
Parameters
event Event
The event object.
complete function
A callback that fires after the entire widget is rendered.
Parameters
event Event
The event object.