Spaces:
Running
Running
Download script.js from jusdy/pa-performance-wizard: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/spaces/jusdy/pa-performance-wizard/resolve/main/script.js
- Command line
-
hf download hf://spaces/jusdy/pa-performance-wizard/script.js
-
curl -L -o script.js https://huggingface.co/spaces/jusdy/pa-performance-wizard/resolve/main/script.js
1.63 kB
| document.addEventListener('DOMContentLoaded', function() { | |
| console.log('Dashboard initialized'); | |
| // Initialize charts | |
| initRatingDistributionChart(); | |
| initFeedbackTrendsChart(); | |
| }); | |
| function initRatingDistributionChart() { | |
| // This would use Chart.js or similar in a real implementation | |
| const chartContainer = document.querySelector('.h-64'); | |
| if (chartContainer) { | |
| chartContainer.innerHTML = ` | |
| <canvas id="ratingChart"></canvas> | |
| <script> | |
| const ctx = document.getElementById('ratingChart').getContext('2d'); | |
| new Chart(ctx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['Q1', 'Q2', 'Q3', 'Q4', 'Q5', 'Q6', 'Q7', 'Q8', 'Q9'], | |
| datasets: [{ | |
| label: 'Average Rating', | |
| data: [4.2, 4.5, 4.3, 4.1, 4.6, 4.4, 4.7, 4.3, 4.5], | |
| backgroundColor: 'rgba(79, 70, 229, 0.7)', | |
| borderColor: 'rgba(79, 70, 229, 1)', | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| max: 5 | |
| } | |
| } | |
| } | |
| }); | |
| </script> | |
| `; | |
| } | |
| } | |
| function initFeedbackTrendsChart() { | |
| // This would be implemented similarly to the rating chart | |
| // Showing trends over time | |
| } | |