E-commerce AI Sentiment Tracking Dashboard

E-commerce AI Sentiment Tracking Dashboard

Analyze customer feedback to understand sentiment trends.

No data analyzed. Please paste your review data in the 'Data Input' tab.

Overall Sentiment

${state.analysis.overall}

Positive

${state.analysis.percentages.positive.toFixed(1)}%

Negative

${state.analysis.percentages.negative.toFixed(1)}%
`; document.getElementById('pdf-chart-img').src = sentimentChart.toBase64Image(); const tableHTML = `${state.analysis.reviewedData.slice(0, 5).map(r => ``).join('')}
ProductReview SnippetSentiment
${r.product}${r.review.substring(0, 50)}...${r.sentiment}
`; document.getElementById('pdf-table-container').innerHTML = tableHTML; const pdfContainer = document.getElementById('pdf-container'); pdfContainer.classList.remove('invisible', '-left-[9999px]'); try { const canvas = await html2canvas(document.getElementById('pdf-report'), { scale: 2 }); const imgData = canvas.toDataURL('image/jpeg', 0.9); const pdf = new jsPDF({ orientation: 'p', unit: 'px', format: 'a4' }); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = (canvas.height * pdfWidth) / canvas.width; pdf.addImage(imgData, 'JPEG', 0, 0, pdfWidth, pdfHeight); pdf.save('Sentiment_Analysis_Report.pdf'); } catch (error) { console.error("PDF generation failed:", error); } finally { pdfContainer.classList.add('invisible', '-left-[9999px]'); } } initialize(); });
Scroll to Top