function renderKPIChart(labels, data) { const ctx = document.getElementById('kpiChart').getContext('2d'); if (window.kpiChart) window.kpiChart.destroy(); window.kpiChart = new Chart(ctx, { type: 'bar', data: { labels: labels, datasets: [{ label: 'IRR (%)', data: data, backgroundColor: '#00C3A3', borderColor: '#2DECBF', borderWidth: 1, borderRadius: 6, }] }, options: { responsive: true, plugins: { legend: { display: false }, tooltip: { mode: 'index', intersect: false, bodyColor: '#FFFFFF', titleColor: '#FFFFFF' } }, scales: { x: { ticks: { color: '#FFFFFF' }, grid: { color: 'rgba(255,255,255,0.1)' } }, y: { ticks: { color: '#FFFFFF' }, grid: { color: 'rgba(255,255,255,0.1)' } } } } }); } function renderTornadoChart(labels, data) { const ctx = document.getElementById('tornadoChart').getContext('2d'); if (window.tornadoChart) window.tornadoChart.destroy(); window.tornadoChart = new Chart(ctx, { type: 'bar', data: { labels: labels, datasets: [{ label: 'ΔIRR', data: data, backgroundColor: '#2DECBF', borderRadius: 5 }] }, options: { indexAxis: 'y', responsive: true, plugins: { legend: { display: false }, tooltip: { bodyColor: '#FFFFFF', titleColor: '#FFFFFF' } }, scales: { x: { ticks: { color: '#FFFFFF' }, grid: { color: 'rgba(255,255,255,0.1)' } }, y: { ticks: { color: '#FFFFFF' }, grid: { color: 'rgba(255,255,255,0.1)' } } } } }); }