Trial Summary

Ashish Prasad

by Kesav Telaprolu

HTML

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://code.highcharts.com/6.1.1/highcharts.js"></script>

<head>
  <style>
    /*
 * Legal Disclaimer
 *
    print '\n', 'Note that the webfonts share the TT sources'
 * These Fonts are licensed for unlimited use on domains and their subdomains of The Kantar Group.
 * It is illegal to download or use them on other websites.
 *
 * While the @font-face statements below may be modified by the client, this
 * disclaimer may not be removed.
 *
 * Lineto.com, 2016
 */

    @font-face {
      font-family: "KantarBrownWeb-LightItalic";
      src: url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-LightItalic.eot");
      src: url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-LightItalic.eot?#iefix") format("embedded-opentype"), url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-LightItalic.woff2") format("woff2"), url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-LightItalic.woff") format("woff");
      font-weight: normal;
      font-style: normal;
    }

    @font-face {
      font-family: "KantarBrownWeb-BoldItalic";
      src: url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-BoldItalic.eot");
      src: url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-BoldItalic.eot?#iefix") format("embedded-opentype"), url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-BoldItalic.woff2") format("woff2"), url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-BoldItalic.woff") format("woff");
      font-weight: normal;
      font-style: normal;
    }

    @font-face {
      font-family: "KantarBrownWeb-Italic";
      src: url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-Italic.eot");
      src:...

JavaScript

(Input => {

    var barlenght = Input.BrandIncrementalTrial.length;
    var chartWidth = ((barlenght* 163)+50);
    var plotlinesVal;
    var maxdatavalue  =[];
    var maxvalue;

    
    var getMaxValue = function() {
     
        maxdatavalue.push(Math.max.apply(null,Input.BrandIncrementalTrial)+Math.max.apply(null,Input.BrandNonIncrementalTrial));
      
        if (Input.hideBenchmarks.toLowerCase() == 'false') {
          maxdatavalue.push(Input.Top25Pctile);
          maxdatavalue.push(Input.Top50Pctile);
        }

        var maxvalue = Math.ceil(Math.max.apply(null,maxdatavalue) * 1.1);
        maxvalue = Math.round((parseInt(maxvalue/10, 10)+1)*10);
        
        if (maxvalue > 100) {
          maxvalue = 100;
        }

        return (maxvalue);
   }
   
   maxvalue = getMaxValue(); 
    var plotlnShowbm =  [{
                value: Math.round(Input.Top25Pctile),
                color: '#81c341',
                dashStyle: 'dash',
                width: 2,
                zIndex: 5,
                label: {
                    text: Math.round(Input.Top25Pctile),
                    style: {
                        color: '#81c341',"fontSize":"19px","fontFamily":"KantarBrownWeb-Light" 
                    },
                    x: Input.Top25Pctile == 100? -40: -30,
                    y: 5
                }
            }, {
                value: Math.round(Input.Top50Pctile),
                color: '#e20613',
                dashStyle: 'dash',
                width: 2,
                zIndex: 5,
                label: {
                    text: Math.round(Input.Top50Pctile),
                    style: {
                        color: '#e20613',"fontSize": "19px","fontFamily": "KantarBrownWeb-Light" 
                    },
                    x: Input.Top25Pctile == 100? -40: -30,
                    y: 5
                }
            }, {
                value: 0,
                color: 'white',
                dashStyle: 'dash',
            ...