Changed around line 1
+ // Dummy data
+ const kaldirdimData = {
+ labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
+ datasets: [{
+ label: 'Kaldırdım Count',
+ data: [3, 5, 7, 4, 6, 8, 5],
+ backgroundColor: 'rgba(76, 175, 80, 0.2)',
+ borderColor: '#4CAF50',
+ borderWidth: 2
+ }]
+ };
+
+ // Initialize chart
+ const ctx = document.getElementById('kaldirdim-chart').getContext('2d');
+ const kaldirdimChart = new Chart(ctx, {
+ type: 'line',
+ data: kaldirdimData,
+ options: {
+ responsive: true,
+ maintainAspectRatio: false,
+ scales: {
+ y: {
+ beginAtZero: true
+ }
+ }
+ }
+ });
+
+ // Betting functionality
+ const betButtons = document.querySelectorAll('.bet-button');
+ const betAmountInput = document.getElementById('bet-amount');
+ const placeBetButton = document.getElementById('place-bet');
+
+ betButtons.forEach(button => {
+ button.addEventListener('click', () => {
+ betButtons.forEach(btn => btn.classList.remove('active'));
+ button.classList.add('active');
+ });
+ });
+
+ placeBetButton.addEventListener('click', () => {
+ const selectedBet = document.querySelector('.bet-button.active');
+ const betAmount = betAmountInput.value;
+
+ if (!selectedBet || !betAmount) {
+ alert('Please select a bet and enter an amount');
+ return;
+ }
+
+ const betType = selectedBet.dataset.bet;
+ const result = Math.random() > 0.5 ? 'win' : 'lose';
+
+ alert(`You placed a $${betAmount} bet on ${betType} 2.5. You ${result}!`);
+
+ // Update leaderboard (dummy implementation)
+ const leaderboard = document.getElementById('leaderboard-list');
+ const newEntry = document.createElement('li');
+ newEntry.textContent = `NewUser - $${Math.floor(Math.random() * 200)}`;
+ leaderboard.prepend(newEntry);
+ });