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;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 => {

	var rightAlignValue = 25;
  DrawConversionModelChart();

  function GenerateChart() {
    $("#chart_div").html(null);
    //TITLE TEMPLATE
    var titleHtml = `
<div class="chartTitles">
   <div id="title"></div>
   <div class='csnBranddiv'><p id="subTitle" class='mle-1' ></p></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: 3px; 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">`;
//IMAGE-GENERATOR-BEGIN-REMOVE
  legendHtml+=   `<div class="legend">
            <div class='roundedTwo' style='float:left'><input type='checkbox' value='None' Evoked set id='toggleEvokedSet' name='check' style='width: 20px;    margin: 0px;' /><label for='toggleEvokedSet'></label></div><span class="checkBoxtext">Evoked set / Consideration</span>
     </div>
     <div class="legend">
            <div class='roundedTwo' style='float:left'><input type='checkbox' value='None' id='toggleHideBrands' name='check' style='width: 20px;    margin: 0px;' /><label for='toggleHideBrands'></label></div><span class="checkBoxtext">Hide brands with small base sizes</span>
     </div>`;
//IMAGE-GENERATOR-END-REMOVE     
legendHtml+= `</div>
`;

    var chartWrapper = $("<div></div>").appendTo("#container")
      .attr("id", "chart_wrapper");

   ...