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 plotlinesVal;

var getMaxValue = function() {
  var maxValue;

  if (input.chart_data.show_benchmarks.toLowerCase() == 'false') {
    maxValue = [Math.max.apply(Math, input.chart_data.data_series[0].data)];
  } else {
    maxValue = [
      Math.max.apply(Math, input.chart_data.data_series[0].data),
      input.chart_data.data_series[0].top_25_pctile,
      input.chart_data.data_series[0].top_50_pctile
    ];
  }

  maxValue.sort(function(a, b) {
    return b - a
  });

  max = Math.round((parseInt((maxValue[0] * 1.1) / 10, 10) + 1) * 10);

  if (max > 100) {
    max = 100;
  }

  return max;
}

var max = getMaxValue();
var min = 0;

var plotlnHidebm = [{
    value: max,
    color: 'white',
    width: 2,
    label: {
      text: max,
      style: {
        color: 'black',
        "fontSize": "19px",
        "fontFamily": "KantarBrownWeb-Light"
      },
      x: max == 100 ? -40 : -35,
      y: 13
    }
  },
  {
    value: min,
    color: 'white',
    dashStyle: 'dash',
    width: 2,
    label: {
      text: min,
      style: {
        color: 'black',
        "fontSize": "19px",
        "fontFamily": "KantarBrownWeb-Light"
      },
      x: -35
    }
  }
];
var plotlnShowbm = [{
    value: max,
    color: 'white',
    width: 2,
    label: {
      text: max,
      style: {
        color: 'black',
        "fontSize": "19px",
        "fontFamily": "KantarBrownWeb-Light"
      },
      x: max == 100 ? -40 : -35,
      y: 13
    }
  },
  {
    value: Math.round(input.chart_data.data_series[0].top_25_pctile),
    color: '#81c341',
    dashStyle: 'dash',
    width: 2,
    zIndex: 5,
    label: {
      text: Math.round(input.chart_data.data_series[0].top_25_pctile),
      style: {
        color: '#81c341',
        "fontSize": "19px",
        "fontFamily": "KantarBrownWeb-Light",
      },
      x: Math.round(input.chart_data.data_series[0].top_25_pctile) == 100 ? -40 : -35,
      y: 5
    }

  }, {
    value:...