|
|
| |
| document.addEventListener('DOMContentLoaded', () => { |
| |
| const ctx = document.getElementById('simpleGraph').getContext('2d'); |
| new Chart(ctx, { |
| type: 'line', |
| data: { |
| labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'], |
| datasets: [{ |
| label: 'Engagement', |
| data: [12, 19, 3, 5, 2, 3], |
| backgroundColor: 'rgba(255, 255, 255, 0.2)', |
| borderColor: 'rgba(255, 255, 255, 0.8)', |
| borderWidth: 2, |
| tension: 0.4, |
| fill: true |
| }] |
| }, |
| options: { |
| responsive: true, |
| maintainAspectRatio: false, |
| plugins: { |
| legend: { |
| display: false |
| } |
| }, |
| scales: { |
| y: { |
| beginAtZero: true, |
| grid: { |
| color: 'rgba(255, 255, 255, 0.1)' |
| }, |
| ticks: { |
| color: 'rgba(255, 255, 255, 0.7)' |
| } |
| }, |
| x: { |
| grid: { |
| color: 'rgba(255, 255, 255, 0.1)' |
| }, |
| ticks: { |
| color: 'rgba(255, 255, 255, 0.7)' |
| } |
| } |
| } |
| } |
| }); |
| }); |
|
|