Avg. Pain Level
${avgPain.toFixed(1)} / 5
${entry.date.toLocaleDateString('en-US', { month: 'numeric', day: 'numeric' })}
`; chartContainer.appendChild(bar); }); } function renderGallery() { const container = document.getElementById('photo-gallery-container'); const photos = logData.filter(entry => entry.photo); if (photos.length === 0) { container.innerHTML = `No photos uploaded yet. Add a photo in the "Daily Log" tab.
`; return; } container.innerHTML = photos.map(entry => `${entry.date.toLocaleDateString()}
Overall Summary
${summaryHtml}
Recent Wear Time Consistency
${chartHtml}
Recent Notes
${recentNotes.length > 0 ? recentNotes.map(e => `${e.date.toLocaleDateString()}
${e.notes}
No notes logged.
'}Recent Photos
${recentPhotos.length > 0 ? recentPhotos.map(e => `
`).join('') : '
${e.date.toLocaleDateString()}
No photos logged.
'}