Q4Widgets API Documentation

q4.peerAnalysisIndex

The Peer Analysis Index widget is used to display the peer median and peer average for a company. Peer List is created in the CMS (Site > Peer List). This widget is templated for Index Sites.
Script link
q4.studioApi.4.0.0.min.js
Source file
q4.studioApi.js, line 3691

This widget extends the q4.peerAnalysis widget. It has all the options and methods of the parent widget, in addition to those below. See the parent widget's documentation for details.

Examples

<script type="text/javascript">
     $('.peer-analysis-widget').peerAnalysisIndex({
         stockApi: "", 
         ticker: [""]
     }); 
 </script>

Options

defaultTemplate string
Default template for out of the box use
The tableTpl and disclaimerTpl will contain the following variable:
  • {{asOfDate}} - the dates which signify the period end date for the data
    • {{company}}
    • {{peer}}
  • {{companies}} - array containing the data for companies included in the analysis. The company data will include:
    • {{exchange}}
    • {{name}}
    • {{peer}} - boolean signifying if the company is a peer
    • {{periodEndDate}}
    • {{symbol}}
    • {{ticker}}
  • {{companyName}}
    • {{name}}
    • {{endsWithS}} - boolean signifying if the last letter in the name is "s"
  • {{tables}} - an array of subtemplates which relates to the templateId being used
    • {{title}}
    • {{magnitude}}
    • {{first}} - boolean
    • {{headers}}
      • {{ticker}}
      • {{median}}
      • {{avg}}
    • {{items}}
      • {{definition}}
      • {{name}}
      • {{values}} - object where the fields would either be {{avg}}, {{median}} or {{ticker}}. Each field will contain the following:
        • {{value}}
        • {{label}}


'<div id="irwWrapper">'+
    '<div class="container peeranalysis irwtext-muted">'+
        '<div class="row">'+
            '<div class="col-md-12">'+
                '<table class="table Tbl-peer irwResponsiveTable table-hover" data-sort="false" data-type="html" data-toggle="true">'+
                '</table>'+
            '</div>'+
            '<div class="col-md-12">'+
                '<div class="irwDisclaimer pull-left">'+
                '</div>'+
            '</div>'+
        '</div>'+
    '</div>'+
'</div>'
tableTpl string
Template for table data

'{{#tables}}' +
    '{{#first}}' +
        '<thead>' +
            '<tr class="active">' +
                '<th class="Tbl-th-FirstCol InstitOwnSorting" data-type="html"><strong>{{title}} {{#magnitude}}({{magnitude}}){{/magnitude}}</strong><th>' +
                '<th class="text-right InstitOwnSorting"><strong>{{headers.ticker}}</strong><th>' +
                '<th data-breakpoints="xs" class="text-right"><strong>{{headers.median}}</strong><th>' +
                '<th data-breakpoints="xs" class="text-right"><strong>{{headers.avg}}</strong><th>' +
            '</tr>' +
        '</thead>' +
        '<tbody>' +
        '{{#items}}' +
            '<tr>' +
                '<td class="text-left text-primary"><a href="javascript:;" rel="showDefinitionLink" data-definition="{{definition}}">{{name}}<a><td>' +
                '<td class="text-right"><span class="text-muted">{{values.ticker.value}}<span><td>' +
                '<td class="text-right"><span class="text-muted">{{values.median.value}}<span><td>' +
                '<td class="text-right"><span class="text-muted">{{values.avg.value}}<span><td>' +
            '</tr>' +
        '{{/items}}' +
    '{{/first}}' +
    '{{^first}}' +
        '<tr class="irwPeerHeader">' +
            '<td><strong>{{title}} {{#magnitude}}({{magnitude}}){{/magnitude}}<strong><td>' +
        '</tr>' +
        '{{#items}}' +
            '<tr class="text-primary">' +
                '<td class="text-left"><a href="javascript:;" rel="showDefinitionLink" data-definition="{{definition}}">{{name}}<a><td>' +
                '<td class="text-right"><span class="text-muted">{{values.ticker.value}}<span><td>' +
                '<td class="text-right"><span class="text-muted">{{values.median.value}}<span><td>' +
                '<td class="text-right"><span class="text-muted">{{values.avg.value}}<span><td>' +
            '</tr>' +
        '{{/items}}' +
    '{{/first}}}' +
    '{{/tables}}'+
'</tbody>'
tablesSelector string
A selector for the table where the table template will be rendered
Default value
.peeranalysis table.Tbl-peer
disclaimerTpl string
Template for disclaimer

'<i>Data for trailing four quarters<i>' +
'<br><br>' +
'<span>' +
'{{#companyName}}'+
    '{{name}}\'{{^endsWithS}}s{{/endsWithS}} peer group consists of the following: ' +
    '{{#companies}}' +
        '{{#peer}}' +
            '{{name}} ({{symbol}}){{^last}}, {{/last}}' +
        '{{/peer}}' +
    '{{/companies}}' +
    '<br><br>' +
    '{{#asOfDate}}' +
        '{{name}}\'{{^endsWithS}}s{{/endsWithS}} financial data is as of {{company}}.' +
        '<br><br>Peer financial data is as of {{peer}}.<span>' +
    '{{/asOfDate}}'+
'{{/companyName}}'
disclaimerSelector string
A selector for the disclaimer container where the disclaimer template will be rendered
Default value
.peeranalysis .irwDisclaimer
popupTpl string
Template to be used for the definition popup.

'<div id="irwWrapper" style="margin:0;padding:0">' +
    '<div class="modal-dialog" style="margin:0;padding:0">' +
        '<div class="modal-content">' +
            '<div class="modal-header bg-primary">' +
                '<h4 class="modal-title"><strong id="ModelTitle">{{title}}</strong></h4>' +
            '</div>' +
            '<div class="modal-body">' +
                '<div id="PopupDive" class="irwScrollbar mCustomScrollbar _mCS_1 _mCS_4" style="max-height: 260px; overflow: hidden;" aria-hidden="true">' +
                    '<div class="mCustomScrollBox mCS-bootstrap-thin" id="mCSB_4" style="position: relative; height: 100%; overflow: hidden; max-width: 100%; max-height: 260px;">' +
                        '<div class="mCSB_container mCS_no_scrollbar" style="position:relative; top:0;">' +
                            '<div>' +
                                '<table style="width:100%" class="table irwPopupTable irwItemDefTable">' +
                                    '<colgroup>' +
                                        '<col class="col-xs-2">' +
                                        '<col class="col-xs-10">' +
                                    '</colgroup>' +
                                    '<tbody>' +
                                        '<tr>' +
                                            '<td class="text-right text-top"><strong>Definition</strong></td>' +
                                            '<td>{{definition}}</td>'     +
                                        '</tr>' +
                                        '<tr>' +
                                            '<td colspan="2">'+
                                                '<small>Data shown on this page is extracted directly from the company’s documents and standardized by S&P Global Market Intelligence. S&P gathers information from numerous sources to ensure that the data we provide is comprehensive and accurate. S&P makes every effort to line up fields, captions and headers that represent the same data over time, despite variations in how the company may report these items in different documents.</small>' +
                                            '</td>' +
                                        '</tr>' +
                                    '</tbody>' +
                                '</table> ' +
                            '</div>' +
                        '</div>' +
                    '</div>' +
                '</div>' +
            '</div>' +
        '</div>' +
    '</div>' +
'</div>'
copyrightDisclaimerTpl string
The template for the copyright disclaimer's popup

'<div id="irwWrapper" style="margin:0;padding:0;">' +
  '<div class="modal-dialog" style="margin:0;padding:0">' +
      '<div class="modal-content">' +
          '<div class="modal-header bg-primary">' +
              '<h4 class="modal-title"><strong id="ModelTitle">Copyright Information</strong></h4>' +
          '</div>' +
          '<div class="modal-body">' +
              '<div id="PopupDive" class="irwScrollbar mCustomScrollbar _mCS_1 _mCS_4" style="max-height: 260px; overflow: hidden;" aria-hidden="true">' +
                  '<div class="mCustomScrollBox mCS-bootstrap-thin" id="mCSB_4" style="position: relative; height: 100%; overflow: hidden; max-width: 100%; max-height: 260px;">' +
                      '<div class="mCSB_container mCS_no_scrollbar" style="position:relative; top:0;">' +
                          '<div>' +
                              'Copyright © 2020, S&P Global Market Intelligence (and its affiliates as applicable). ' +
                              'Reproduction of any information, opinions, views, data or material, including ratings (“Content”) in any form is prohibited except with the prior written permission of the relevant party. ' +
                              'Such party, its affiliates and suppliers (“Content Providers”) do not guarantee the accuracy, adequacy, completeness, timeliness or availability of any Content and are not responsible for any errors or omissions (negligent or otherwise), regardless of the cause, or for the results obtained from the use of such Content. ' +
                              'In no event shall Content Providers be liable for any damages, costs, expenses, legal fees, or losses (including lost income or lost profit and opportunity costs) in connection with any use of the Content. ' +
                              'A reference to a particular investment or security, a rating or any observation concerning an investment that is part of the Content is not a recommendation to buy, sell or hold such investment or security, does not address the suitability of an investment or security and should not be relied on as investment advice. ' +
                              'Credit ratings are statements of opinions and are not statements of fact.' +
                          '</div>' +
                      '</div>' +
                  '</div>' +
              '</div>' +
          '</div>' +
      '</div>' +
  '</div>' +
'</div>'