JSFiddle - React, Tailwind, and code Playground

by Kesav Telaprolu

HTML

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

<div id="container" style="width: 1240px;height: 688px;border-radius: 10px;border: 1px solid #dbdbdb;position:relative"></div>

CSS

/*
 * 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: 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 {
 ...

JavaScript

(input => {

//-chart one input
var riskValue = [], steadyvalue = [], opportunityValue = [], dataSeries = [];
//-chart two input
var shareLostValue = [], decreaseSpendValue = [], shareGainedValue = [], increaseSpendValue = [], individualSegments = [];
for (var val = 0; val < input.brands.length; val++) {
    if (input.brands[val].grouped.risk != "" && input.brands[val].grouped.risk != null) {
        riskValue.push(input.brands[val].grouped.risk);
    } else {
        riskValue.push(0);
    }

    if (input.brands[val].grouped.steady != "" && input.brands[val].grouped.steady != null) {
        steadyvalue.push(input.brands[val].grouped.steady);
    } else {
        steadyvalue.push(0);
    }

    if (input.brands[val].grouped.Opportunity != "" && input.brands[val].grouped.Opportunity != null) {
        opportunityValue.push(input.brands[val].grouped.Opportunity);
    } else {
        opportunityValue.push(0);
    }

    if (input.brands[val].ungrouped.shareLost != "" && input.brands[val].ungrouped.shareLost != null) {
        shareLostValue.push(input.brands[val].ungrouped.shareLost);
    } else {
        shareLostValue.push(0);
    }

    if (input.brands[val].ungrouped.decreaseSpend != "" && input.brands[val].ungrouped.decreaseSpend != null) {
        decreaseSpendValue.push(input.brands[val].ungrouped.decreaseSpend);
    } else {
        decreaseSpendValue.push(0);
    }

    if (input.brands[val].ungrouped.shareGained != "" && input.brands[val].ungrouped.shareGained != null) {
        shareGainedValue.push(input.brands[val].ungrouped.shareGained);
    } else {
        shareGainedValue.push(0);
    }

    if (input.brands[val].ungrouped.increasesSpend != "" && input.brands[val].ungrouped.increasesSpend != null) {
        increaseSpendValue.push(input.brands[val].ungrouped.increasesSpend);
    } else {
        increaseSpendValue.push(0);
   ...