(input => {
var chartWrapper = $("<div></div>").appendTo("#container")
.attr("id", "chart_wrapper");
var chartDiv = $("<div></div>").appendTo("#chart_wrapper")
.attr("id", "chart_div");
$('#chart_wrapper').append(`<style>
#chart_wrapper{
min-width:1240px;
height:688px;
position:relative;
padding: 35px 30px 20px 30px;
box-sizing:border-box;
}
#chart_div{
width:100%;
height:100%;
}
#chart_wrapper p {
margin : 0px;
}
#chart_wrapper div {
margin : 0px;
box-sizing:border-box;
}
</style>`)
var templs = {
"chartTitle": "This report shows us an overview of the performance of <brandName> advert as well as the brands performance in the market.",
"brandfluency": "These people <brandValue>% of sample, correctly recognised the advert (Sum of Internalised Branding + Non-internalised Branding).<br>Wave: <wave> <br> <brandName>: <brandValue>% <br> n. <base size>",
"amp": "These people <brandValue>% of sample, moved through all three 'gateways' in terms of novelty, connects personally and is relevant to their needs.<br> Wave: <wave> <br> <brandName>: <brandValue>% <br> n. <base size>",
"pim": "Commitment to <brandName> <br> Wave: <wave><br> <brandName>: <brandValue>%<br> n. <base size>",
"ms-pim": "<brandName> has a <markeshare>% market share. The average commitment to <brandName> is <pim>%"
}
var tmpl1 = '<div style="z-index:1;font-family:KantarBrownWeb-Light;font-size: 17px;color: #000000;position:absolute;width:503px; box-sizing: border-box; padding: 10px; border: 1px solid #ccc;background:#FFF;box-shadow: 0px 2px 10px 0px rgba(0,0,0,.3);border-radius:5px" id="tip"></div>';
var pim = [], brandFluency = [], amp = [], marketshare = [], waves = [], baseCount = [];
for (var i = 0; i < input.chartData.dataSeries.length; i++) {
pim.push(Number(input.chartData.dataSeries[i].measures.pim));
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.