${spins}X Spin ${type} ✅✅✅
`; polaList.appendChild(div); }); } function generateRandomGraph() { const canvas = document.getElementById('rtpCanvas'); const ctx = canvas.getContext('2d'); const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']; const data = graphData; ctx.clearRect(0, 0, canvas.width, canvas.height); const padding = 30; const availableWidth = canvas.width - (padding * 2); const barWidth = 25; const totalBarsWidth = barWidth * 7; const spacing = Math.floor((availableWidth - totalBarsWidth) / 6); const startX = Math.floor((canvas.width - (totalBarsWidth + spacing * 6)) / 2); for (let i = 0; i < days.length; i++) { const barHeight = (data[i] / 100) * (canvas.height - 2 * padding - 30); const x = startX + (barWidth + spacing) * i; const y = canvas.height - padding - barHeight; // Draw bar const gradient = ctx.createLinearGradient(x, y, x, y + barHeight); gradient.addColorStop(0, '#4caf50'); gradient.addColorStop(1, '#45a049'); ctx.fillStyle = gradient; ctx.fillRect(x, y, barWidth, barHeight); // Draw percentage ctx.fillStyle = '#fff'; ctx.font = 'bold 12px Arial'; const percentage = Math.round(data[i]) + '%'; const textWidth = ctx.measureText(percentage).width; ctx.fillText(percentage, x + (barWidth - textWidth) / 2, y - 5); // Draw day label ctx.fillText(days[i], x + (barWidth - ctx.measureText(days[i]).width) / 2, canvas.height - padding + 15); } }