Affective Memory Potential Series

Ashish Prasad

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;"></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 => {
    DrawConversionModelChart();

    function GenerateChart() {
        $("#container").html(null);

        //TITLE TEMPLATE
        var titleHtml = `
<div class="chartTitles">
   <div id="title"></div>
   <div id="subTitle"></div>
</div>`;

        //CHART TEMPLATE
        var chartHtml = `<div id="chartContainer"></div>`;

        //LEGEND TEMPLATE
        var legendHtml =
            `<style type='text/css'>.roundedTwo label {  width: 16px;  height: 16px;  margin-top: 4px; position: absolute;  cursor: pointer;  background-image: linear-gradient(180deg, #fff 0%, #eaeaea 100%); border-radius: 50px;  box-shadow: inset 0px 0.5px 0.5px rgba(0, 0, 0, 0.4), 1px 1px 1px rgba(255, 255, 255, 1);}.roundedTwo label:after {  content: '';  width: 11px;  height: 4px;  position: absolute;  top: 2px;  left: 3px;  border: 2.4px solid #14b5ea;  border-top: none;  border-right: none;  background: transparent;  opacity: 0;  transform: rotate(-50deg);}.roundedTwo input[type=checkbox] {  visibility: hidden;}.roundedTwo input[type=checkbox]:checked + label:after {  opacity: 1;}</style>
<div id="legendWrapper">     
     <div class="legend"> 
             <p class="legend-name">
            <span class="legend-dot atRiskDefect"></span>At risk defect</p> 
     </div>
     <div class="legend"> 
             <p class="legend-name">
            <span class="legend-dot atRiskLessSpend"></span>At risk less spend</p> 
     </div>
     <div class="legend"> 
             <p class="legend-name">
            <span class="legend-dot steadyShare"></span>Steady share</p> 
     </div>
     <div class="legend"> 
             <p class="legend-name">
            <span class="legend-dot opportunitiesMoreSpend"></span>Opportunities more spend</p> 
     </div>
     <div class="legend"> 
             <p class="legend-name">
            <span class="legend-dot opportunitiesNewUser"></span>Opportunities new user</p> 
     </div>
     <div class="legend" style="margin-top:4px">
            <div...