// Chart 63938cf75e2eb const config63938cf75e2eb = { type: 'bar', data: { labels: [["Gründer*innen","mit","Migrationshintergrund"], ["Erwerbstätige","mit","Migrationshintergrund"]], datasets: [ {label: '2020',data: ["20.3","25.0",], backgroundColor: ['#ffb09f','#ffb09f','#ffb09f','#ffb09f','#ffb09f']},{label: '2021',data: ["21.5","25.9",], backgroundColor: ['#2e2d2c','#2e2d2c','#2e2d2c','#2e2d2c','#2e2d2c']},{label: '2022',data: ["22.0","27.0",], backgroundColor: ['#ffe78e','#ffe78e','#ffe78e','#ffe78e','#ffe78e']}, ] }, options: { locale: 'de-DE', responsive: true, maintainAspectRatio: false, aspectRatio: 1, plugins: { paddingBelowLegends: true, legend: { display: true, align: 'start', labels: { padding: 5, }, }, tooltip: { enabled: false }, datalabels: { align: 'end', anchor: 'end', color: '#000000', font: function(context) { var w = context.chart.width; return { size: w < 512 ? 12 : 14, weight: 'bold', }; }, formatter: function(value, context) { return Number(value).toLocaleString('de-DE', { minimumFractionDigits: 1, maximumFractionDigits: 1, }) + '%'; }, }, paddingBelowLegends: true }, layout: { padding: { left: 0, right: 0, top: 0, bottom: 0, } }, scales: { y: { display: false, beginAtZero: true, tooltip: false, grid: { display:false }, border: { display: false }, ticks: { callback: function(value, index, values) { value = value.toString(); value = value.split(/(?=(?:...)*$)/); value = value.join('.'); return value; }, }, }, x: { tooltip: false, grid: { display:false }, ticks: { font: { size: 10 }, }, }, }, } } Chart.register(ChartDataLabels); chart63938cf75e2eb = new Chart(document.getElementById('63938cf75e2eb').getContext('2d'), config63938cf75e2eb); // Chart 63938cf2d7ab7 const config63938cf2d7ab7 = { type: 'bar', data: { labels: ['2018','2019','2020','2021','2022',], datasets: [{ label: '# of Votes', data: ['15.1','15.7','15.9','17.7','20.3',], borderWidth: 1, backgroundColor: [ '#2e2d2c', '#2e2d2c', '#2e2d2c', '#2e2d2c', '#ffe78e', ], }] }, options: { responsive: true, maintainAspectRatio: false, aspectRatio: 1, plugins: { legend: false, tooltip: { enabled: false }, datalabels: { align: 'end', anchor: 'end', color: '#000000', font: function(context) { var w = context.chart.width; return { size: w < 512 ? 12 : 14, weight: 'bold', }; }, formatter: function(value, context) { return Number(value).toLocaleString('de-DE', { minimumFractionDigits: 1, maximumFractionDigits: 1, }) + '%'; }, } }, layout: { padding: { right: 0, top: 30 } }, scales: { y: { display: false, beginAtZero: true, tooltip: false, grid: { display:false }, border: { display: false } }, x: { tooltip: false, grid: { display:false, tickLength: 10, }, }, }, } }; Chart.register(ChartDataLabels); chart63938cf2d7ab7 = new Chart(document.getElementById('63938cf2d7ab7').getContext('2d'), config63938cf2d7ab7); // Chart 63938cfb93e62 Chart.register(ChartDataLabels); const config63938cfb93e62 = { type: 'bar', data: { labels: ["Deutschland","EU","USA"], datasets: [ { label: 'Female-Teams', data: [ "0.8","1.3","3.0", ], backgroundColor: ['#ffe78e','#ffe78e','#ffe78e','#ffe78e','#ffe78e'] }, { label: 'Mixed-Teams', data: [ "8.3","9.3","9.9", ], backgroundColor: ['#2e2d2c','#2e2d2c','#2e2d2c','#2e2d2c','#2e2d2c'] }, ] }, options: { responsive: true, maintainAspectRatio: false, aspectRatio: 1, plugins: { legend: false, tooltip: { enabled: false }, datalabels: { align: 'center', anchor: 'center', color: '#ffffff', font: function(context) { var w = context.chart.width; return { size: w < 512 ? 12 : 14, weight: 'bold', }; }, formatter: function(value, context) { return Number(value).toLocaleString('de-DE', { minimumFractionDigits: 1, maximumFractionDigits: 1, }) + '%'; }, } }, layout: { padding: { left: 0, right: 0, top: 0, bottom: 0, } }, scales: { y: { stacked: true, display: false, beginAtZero: true, tooltip: false, grid: { display:false }, border: { display: false }, ticks: { stepSize: 1, padding: '20', crossAlign: 'start' } }, x: { stacked: true, tooltip: false, grid: { display:false, tickLength: 30, }, ticks: { padding: 0, crossAlign: 'start' }, }, }, } } Chart.register(ChartDataLabels); chart63938cfb93e62 = new Chart(document.getElementById('63938cfb93e62').getContext('2d'), config63938cfb93e62); $(window).on('resize scroll', function() { $( ".viewport-chart:in-viewport" ).each(function( index ) { var chartanimation = $(this).attr("data-chart-animation"); var chartid = $(this).attr("data-chartid"); if(chartanimation == 'false' && chartid == '63938cf75e2eb'){ chart63938cf75e2eb.destroy(); chart63938cf75e2eb = new Chart(document.getElementById('63938cf75e2eb').getContext('2d'), config63938cf75e2eb); $(this).attr("data-chart-animation","true"); } if(chartanimation == 'false' && chartid == '63938cf2d7ab7'){ chart63938cf2d7ab7.destroy(); chart63938cf2d7ab7 = new Chart(document.getElementById('63938cf2d7ab7').getContext('2d'), config63938cf2d7ab7); $(this).attr("data-chart-animation","true"); } if(chartanimation == 'false' && chartid == '63938cfb93e62'){ chart63938cfb93e62.destroy(); chart63938cfb93e62 = new Chart(document.getElementById('63938cfb93e62').getContext('2d'), config63938cfb93e62); $(this).attr("data-chart-animation","true"); } }); });