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;overflow: auto;border:1px solid #dbdbdb;border-radius:10px;"></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:...
JavaScript
(Input => {
$('head').append(`<style>
div.example {
padding: 0px;
background: #ffffff;
}
/* Use for 3 lines of text before truncation */
.mle-3 {
overflow: hidden;
position: relative;
line-height: 1em;
max-height: 3em;
text-align: center;
padding-right: 1em;
padding-left: 1em;
padding-top:6px;
}
.mle-3:before {
content: '...';
position: absolute;
right: 0;
bottom: 0;
}
.mle-3:after {
content: '';
position: absolute;
right: 0;
width: 1em;
height: 1em;
margin-top: 0.2em;
background: #FFFFFF;
}
.concepts {
font-weight:700;
width:150px;
font-family:KantarBrownWeb-Bold;
font-size:17px;
color:#000000;
white-space: normal;
word-wrap:break-word;
}
</style>`);
var chartHeader = `<div id=title></div>
<div id=subTitle ></div>
<div id=chartTitle ></div>`;
var leftDivision = `<div style="position:relative;"><div class='leftDiv' >
<div id="leftcolumn" style="width:440px;margin-left: 51px;box-sizing: border-box;margin-top:21px;"> </div>
<div id="tbldiv" style="width:440px;margin-left:80px;position:relative;margin-top:-40px;">
<table style="border-collapse: collapse;">
<tr style="border-bottom:1px solid #575757;height:35px;">
<td>
<div style="width:84px;font-family:KantarBrownWeb-Bold;font-size:12px;color:#000000;">End year 1 Distribution</div>
</td>
<td>
<div style="width:145px;font-family:KantarBrownWeb-Light;font-size:17px;color:#000000;text-align: center;" id="distValue">10%</div>
</td>
</tr>
<tr style="border-bottom:1px solid #000000;height:35px;">
<td>
<div style="width:84px;font-family:KantarBrownWeb-Bold;font-size:12px;color:#000000;">Advertising</div>
</td>
<td>
<div style="width:145px;font-family:KantarBrownWeb-Light;font-size:17px;color:#000000;text-align: center;" id="advValue"></div>
</td>
</tr>
</table>
...