Investment Index Tracking Tool

Investment Index Tracking Tool

Visualize and Track Major Market Indices

0.00

Current Value

0.00

Today's Change

0.00%

Year-to-Date (YTD) Return

Index Performance Report

For | Generated on

Performance Summary

Historical Performance ()

Raw Data (Last 10 Days)

(${dayChangeEl.textContent.split(' ')[1].replace(/[()]/g, '')})

Today's Change

${ytdReturnEl.textContent}

YTD Return

`; document.getElementById('pdf-chart-image').src = performanceChart.toBase64Image(); let tableHtml = ''; data.slice(-10).reverse().forEach(d => { tableHtml += ``; }); tableHtml += '
DateClose Price
${d.date}${d.close.toFixed(2)}
'; document.getElementById('pdf-data-table').innerHTML = tableHtml; const reportEl = document.getElementById('pdf-report'); reportEl.style.display = 'block'; const canvas = await html2canvas(reportEl, { scale: 2 }); reportEl.style.display = 'none'; const imgData = canvas.toDataURL('image/png'); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (canvas.height * pdfWidth) / canvas.width; pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, pdfHeight); pdf.save(`${selectedIndex}-Performance-Report.pdf`); } });
Scroll to Top