function renderIPChart(targetId, options) {
var canvasId = 'ipcanvas_' + Math.floor(1000 * Math.random());
if (!targetId) {
targetId = canvasId + '_div';
document.write('');
}
var html = ''
+ '';
document.getElementById(targetId).innerHTML = '' + html + '';
var chartData = {"labels":[2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023],"datasets":[{"label":"Zisk po zdanen\u00ed","data":[-1673,2519,2825,2209,-797,-6148,-10292,-12713,-15419,938,-12585,2608,15663,20150,3614],"fillColor":"rgba(43,153,193,0.2)","strokeColor":"rgba(43,153,193,1)","pointColor":"rgba(43,153,193,1)","pointHighlightFill":"rgba(255,255,255,1)"}]};
if (options) {
for (var key in options) {
chartData['datasets'][0][key] = options[key];
}
}
var char_options = {
bezierCurve: false,
scaleLabel : '<%= Number(value).toLocaleString().replace(/,/g, " ") %>',
tooltipTemplate: '<%= Number(value).toLocaleString().replace(/,/g, " ") %> €',
legendTemplate:
'<% for (var i=0; i\
\
<%= datasets[i].label %> \
<% } %>'
};
var chart_ctx = document.getElementById(canvasId).getContext('2d');
var chart = new Chart(chart_ctx).Line(chartData, char_options);
document.getElementById(canvasId + '_legend').innerHTML = chart.generateLegend();
}