JSFiddle - React, Tailwind, and code Playground

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>
<div id="container" style="width: 1240px;        
             height: 688px;               
             border-radius: 10px;               
             border: 1px solid #dbdbdb;
             overflow:auto;
             position:relative;">

</div>

CSS

@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: url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-Italic.eot?#iefix") format("embedded-opentype"), url("https://riofontstorage.blob.core.windows.net/kantar-fonts/KantarBrownWeb-Italic.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

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

JavaScript

(input => {
    var _OverAll = [],
        _Defect = [],
        _Less_spend = [],
        _Steady = [],
        _More_spend = [],
        _New_users = [],
        Evoked =[],UsageBox=[],PIM=[],cons=[],Evok=[],ms=[],subheader=[];
    input.dataSeries.map(function (segment) {
        switch (segment.segmentName.toLowerCase()) {
            case "overall":
                _OverAll.push(segment);
                break;
            case "defect":
                _Defect.push(segment);
                break;
            case "less spend":
                _Less_spend.push(segment);
                break;
            case "steady":
                _Steady.push(segment);
                break;
            case "more spend":
                _More_spend.push(segment);
                break;
            case "new users":
                _New_users.push(segment);
                break;
        }
    });


    var templs = {
                "charttile":"This is a comprehensive overview of the overall equity situation of <client brand>. It displays commitment groups linked to <client brand>'s Power in the mind and Market share.",
                "riskDefect":"People in this group are occasional users of <client brand>. They are at risk of converting to competitors and ceasing to use <client brand> completely. These are people among whom <client brand>'s current market share is not supported by commitment.",
                "riskLess":"People in this group are occasional users of <client brand>. They are at risk of spending less on <client brand> than they currently do, if certain market factors are not met. These are people among whom <client brand>'s current market share is under-supported by commitment.",
                "Steady":"These are people for whom <client brand>'s current market share is more or less the same as it's underlying Power in the mind.",
                "OppLessSpend":"People in this group would spend more on <client brand> than they currently do, if...