(function () {
var script = document.getElementById('highcharts-script');
function addChart() {
function parseData(completeHandler, chartOptions) {
try {
var dataOptions = {
"seriesMapping": [
{
"x": 0
},
{
"x": 0
},
{
"x": 0
},
{
"x": 0
},
{
"x": 0
},
{
"x": 0
},
{
"x": 0
}
],
"columnTypes": [
"date",
"float",
"float",
"float",
"float",
"float",
"float",
"float"
],
"csv": "DATE,Average,Ireland,France,Italy,Spain,Germany,Netherlands\n1262304000000,1.74,3.13,1.44,0.95,2.09,1.12,2.15\n1264982400000,1.75,3.09,1.45,0.95,1.99,1.21,2.15\n1267401600000,1.9,3.03,1.47,0.94,2.15,1.35,2.41\n1270080000000,2.02,2.9,1.39,0.95,2.3,1.07,2.17\n1272672000000,2.04,2.88,1.4,0.98,2.12,0.96,2.26\n1275350400000,2.15,2.86,1.41,1.29,2.49,0.95,2.69\n1277942400000,2.3,2.88,1.42,1.31,2.56,1.08,2.5\n1280620800000,2.2,2.86,1.82,1.4,2.46,1.03,2.31\n1283299200000,2.24,2.83,1.8,1.39,2.71,1.03,2.44\n1285891200000,2.35,2.86,1.91,1.25,2.61,1.12,2.42\n1288569600000,2.32,2.88,1.83,1.28,2.75,1.16,2.49\n1291161600000,2.25,2.9,1.87,1.4,2.68,1.08,2.49\n1293840000000,2.38,2.92,1.91,1.5,2.58,1.27,2.46\n1296518400000,2.35,2.93,2.01,1.61,2.48,1.22,2.47\n1298937600000,2.34,2.96,1.96,1.66,2.55,1.17,2.51\n1301616000000,2.46,3,2.08,1.67,2.53,1.35,2.43\n1304208000000,2.52,3.05,2.05,1.73,2.62,1.37,2.44\n1306886400000,2.57,3.09,2.07,1.99,2.65,1.41,2.29\n1309478400000,2.73,3.17,2.18,2.06,2.61,1.54,2.45\n1312156800000,2.72,3.24,2.17,2.41,2.53,1.51,2.36\n1314835200000,2.71,3.32,2.21,2.55,2.74,1.51,2.82\n1317427200000,2.87,3.4,2.2,3.1,2.62,1.57,3.12\n1320105600000,2.76,3.44,2.13,3.12,2.74,1.53,3.1\n1322697600000,2.76,3.49,2.2,3.46,2.73,1.38,2.84\n1325376000000,2.92,3.57,2.25,3.39,2.73,1.43,3.16\n1328054400000,2.87,3.6,2.18,3.21,2.64,1.33,3.03\n1330560000000,2.84,3.61,2.09,3.1,2.56,1.25,2.8\n1333238400000,2.8,3.68,1.92,2.73,2.38,1.27,2.67\n1335830400000,2.64,3.66,1.86,2.69,2.32,1.21,2.57\n1338508800000,2.69,3.64,1.75,2.81,2.38,1.15,2.45\n1341100800000,2.78,3.6,1.9,2.96,2.5,1.26,2.68\n1343779200000,2.63,3.54,1.8,2.81,2.53,1.16,2.78\n1346457600000,2.77,3.47,1.81,2.73,2.9,1.17,2.85\n1349049600000,2.72,3.41,2.08,2.74,2.83,0.97,2.72\n1351728000000,2.7,3.35,1.61,2.67,3.01,0.96,2.57\n1354320000000,2.71,3.29,1.73,2.65,2.97,0.75,2.55\n1356998400000,2.58,3.23,1.8,2.55,2.43,0.83,2.42\n1359676800000,2.42,3.15,1.72,2.65,1.65,0.88,2.31\n1362096000000,2.26,3.06,1.58,2.44,1.49,0.73,2.15\n1364774400000,2.31,2.92,1.66,2.32,1.53,0.76,2.21\n1367366400000,2.02,2.78,1.58,2.13,1.55,0.77,2.52\n1370044800000,1.86,2.69,1.64,2.03,1.41,0.71,2.31\n1372636800000,1.85,2.61,1.78,2.01,1.44,0.68,1.98\n1375315200000,1.78,2.5,1.61,2.19,1.38,0.7,2.07\n1377993600000,1.68,2.39,1.48,1.82,1.38,0.67,1.82\n1380585600000,1.7,2.28,1.62,1.9,1.42,0.66,1.63\n1383264000000,1.57,2.23,1.56,1.91,1.32,0.69,1.66\n1385856000000,1.56,2.18,1.58,1.81,1.23,0.61,1.7\n1388534400000,1.64,2.13,1.89,1.82,1.21,0.7,1.76\n1391212800000,1.59,2.09,1.75,1.86,1.16,0.73,1.96\n1393632000000,1.55,2.04,1.72,1.87,1.05,0.65,1.93\n1396310400000,1.55,2,1.49,1.83,0.96,0.65,2.1\n1398902400000,1.41,1.97,1.57,1.78,0.94,0.64,1.99\n1401580800000,1.33,1.95,1.66,1.74,0.86,0.63,1.95\n1404172800000,1.3,1.92,1.86,1.58,0.79,0.53,1.96\n1406851200000,1.22,1.88,1.7,1.5,0.73,0.54,1.62\n1409529600000,1.19,1.83,1.68,1.46,0.69,0.51,1.99\n1412121600000,1.11,1.78,1.64,1.35,0.62,0.51,1.75\n1414800000000,1.04,1.74,1.67,1.27,0.59,0.51,1.63\n1417392000000,0.98,1.7,1.48,1.21,0.59,0.37,1.38\n1420070400000,1.03,1.64,1.8,1.29,0.56,0.53,1.82\n1422748800000,1.01,1.59,1.67,1.34,0.49,0.53,1.86\n1425168000000,0.9,1.51,1.54,1.24,0.45,0.39,1.4\n1427846400000,0.89,1.43,1.32,1.24,0.42,0.34,1.73\n1430438400000,0.87,1.36,1.24,1.21,0.41,0.36,1.72\n1433116800000,0.8,1.29,1.14,1.27,0.4,0.29,1.57\n1435708800000,0.68,1.23,1.32,1.18,0.38,0.33,1.79\n1438387200000,0.69,1.17,1.24,1.2,0.38,0.32,1.72\n1441065600000,0.68,1.1,1.34,1.04,0.38,0.34,1.89\n1443657600000,0.66,1.04,1.38,1.06,0.41,0.34,1.88\n1446336000000,0.65,0.98,1.36,1.12,0.37,0.34,1.84\n1448928000000,0.65,0.93,1.37,1.26,0.35,0.28,1.66\n1451606400000,0.65,0.88,1.59,1.17,0.33,0.35,1.53\n1454284800000,0.62,0.83,1.41,1.15,0.3,0.34,1.59"
};
dataOptions.sort = true
dataOptions.complete = completeHandler;
Highcharts.data(dataOptions, chartOptions);
} catch (error) {
console.log(error);
completeHandler(undefined);
}
}
var shareUrl = 'https://app.everviz.com/show/ifyduj';
var encodedUrl = encodeURIComponent(shareUrl);
var template = {
chart: {
renderTo: 'highcharts-ifyduj'
},
navigation: {
menuItemStyle: {
fontFamily: Highcharts.SVGRenderer.prototype.getStyle().fontFamily,
padding: '2px 10px'
}
},
exporting: {
buttons: {
contextButton: {
menuItems: [{
text: '' +
'Share on Facebook'
}, {
text: '' +
'Share on Google+'
}, {
text: '' +
'Share on Twitter'
}, {
text: '' +
'Share on LinkedIn'
}, {
separator: true
}]
.concat(Highcharts.getOptions().exporting.buttons.contextButton.menuItems)
.concat([{
separator: true
}, {
text: '' + 'Edit chart'
}, {
text: '' + 'Create chart'
}])
}
}
}
};
var chartOptions = {
"yAxis": {
"title": {
"text": "Average rate (%)"
}
},
"credits": {
"text": "European Central Bank/Raisin",
"href": null
},
"series": [
{
"index": 0
},
{
"index": 1
},
{
"index": 2
},
{
"index": 3
},
{
"index": 4
},
{
"index": 5
},
{
"index": 6
}
],
"title": {
"text": "Interest rates on deposits with fixed terms of one year or less"
},
"chart": {
"type": "line"
},
"colors": [
"#7cb5ec",
"#2abc19",
"#4c4cec",
"#da2d2d",
"#dfdc64",
"#806f73",
"#ec8626",
"#2b908f",
"#f45b5b",
"#91e8e1"
]
};
parseData(function (dataOptions) {
// Merge series configs
if (chartOptions.series && dataOptions) {
Highcharts.each(chartOptions.series, function (series, i) {
chartOptions.series[i] = Highcharts.merge(series, dataOptions.series[i]);
});
}
var options = Highcharts.merge(dataOptions, chartOptions, template);
var chart = new Highcharts['Chart'](options);
}, chartOptions);
}
// Load the Highcharts script if undefined, and add the chart
if (typeof Highcharts !== 'undefined') {
addChart();
} else if (script) {
script.deferredCharts.push(addChart);
} else {
script = document.createElement('script');
script.id = 'highcharts-script';
script.src = '//app.everviz.com/resources/js/highstock-cloud-5.0.7.js';
script.type = 'text/javascript';
script.deferredCharts = [addChart];
script.onload = function () {
// Prevent double firing of event in IE9/IE10
if (!script.chartsAdded) {
script.chartsAdded = true;
while(script.deferredCharts.length) {
script.deferredCharts.shift()();
}
}
};
script.onreadystatechange = function() {
if (this.readyState == 'complete' || this.readyState == 'loaded') {
script.onload();
}
};
document.getElementsByTagName('head')[0].appendChild(script);
}
}());