Q4Widgets API Documentation

q4.financialTable

A table of different types of financial documents sorted by year. Each year can have links to documents for each quarter.
Script link
q4.financialtable.1.2.3.min.js
Source file
q4.financialtable.js, line 2
Requires

Examples

$("#financials").financialTable({
    firstYear: 2014,
    reportTypes: ['Annual Report', 'Supplemental Report']
});

Options

url string
The base URL to use for API calls. By default, calls go to the current domain, so this option is usually unnecessary.
languageId
A number representing which language to pull data from. By default it auto detects language.
tags Array.<string>
A list of tags to filter by.
reportTypes Array.<string>
A list of report subtypes to display, or an empty list to display all. Valid values are: - `Annual Report` - `Supplemental Report` - `First Quarter` - `Second Quarter` - `Third Quarter` - `Fourth Quarter`
Default value
[]
columns number
The number of year columns to display. Set to zero to show all columns (default).
firstYear numberstring
The earliest year to display; previous years will be ignored. Set to zero to show all years (default).
useSEC
Use SEC API
Default value
false
symbol string
The stock symbol to look up SEC filings. Only applicable if useSEC is true If you are looking up the company by CIK, enter the CIK number here.
exchange string
The exchange of the stock symbol to look up. Only applicable if useSEC is true If you are looking up the company by CIK, enter `CIK`.
Default value
CIK
secFilingTypes object
Map the available SEC filing types to a category in the categories template option. Key - Should match the value of the FilingTypeMnemonic field in the SEC API. Value (Object) - 'category', used to identify through the SCHEMA. 'preferredDocs', array of string; identify preferred filetypes to show.
Default value
{"undefined":""}
Example
'10-Q' : {
                    category: 'SEC10-Q',
                    preferredDocs: ['CONVPDF', 'XBRL_HTML', 'HTML', 'RTF', 'XLS', 'XBRL']
                },
secGroup string
Filing groups to use when making the SEC API call (instead of grabbing all filing types). 'Group numbers should be included in a string, separated by a comma(s). The default groups of '1,2,4' will typically only include 10-Q and 10-K filings.
Default value
1,2,4
secQuarterlyRange object
Define the range of months for quarterly filings excluding Fourth Quarter. Numbers are indicated as index of months start from '0'. ie. '1' is February and '4' is May
Default value
{"undefined":""}
secAnnualSameYear object
Define if 10-K should be in the same year as date reported
Default value
false
categories Array.<Object>
An array of document categories that will appear as rows in the table.
Example
[
    {
         title: 'Quarterly Reports',
         reportType: ['First Quarter', 'Second Quarter', 'Third Quarter', 'Fourth Quarter'],
         category: ['Financials'],
         text: '{{shortType}}'
    },
    {
         title: 'Annual Reports',
         reportType: ['Annual Report'],
         text: 'Annual ({{fileType}})'
    }
]
shortTypes Object
A map of short names for each report subtype.
template string
A mustache.js template for the financial report list. Use {{#years}} to loop through document years. Use {{#categories}} to loop through document categories. Categories have these tags: {{catTitle}}, {{catClass}} Within a category, use {{#catYears}} to loop through years. Within a year, use {{#docs}} to loop through documents. Documents can have these tags: - `{{text}}` The value of the category's "text" option (which might contain any of the below tags). - `{{fileType}}` The document file type. - `{{shortType}}` The short name of the report subtype, as defined in options.shortTypes (e.g. Q1, Q2, Annual). - `{{size}}` The size of the document file. - `{{title}}` The title of the document. - `{{url}}` The URL of the document file. - `{{thumb}}` The thumbnail of the document file. - `{{cover}}` he cover image of the report quarter/year. - `{{year}}` The fiscal year of the report.
Example
'<ul class="ftHeader">' +
    '<li>Document</li>' +
    '{{#years}}<li>{{year}}</li>{{/years}}' +
'</ul>' +
'{{#categories}}' +
'<ul class="ftRow {{catClass}}">' +
    '<li>{{catTitle}}</li>' +
    '{{#catYears}}' +
    '<li>' +
        '{{#docs}}<a href="{{url}}" class="docLink {{fileType}}">{{{text}}}</a>{{/docs}}' +
    '</li>' +
    '{{/catYears}}' +
'</ul>' +
'{{/categories}}'
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.
sortAscending boolean
Show years in ascending order
complete function
A callback fired when rendering is completed.
Parameters
event Event
The event object.
beforeRender function
A callback that fires before the full widget is rendered.
Parameters
event Event
The event object.
templateData Object
The complete template data.