Spaces:
Running
Running
Download script.js from tegbindra/edutrack-dashboard: direct link, hf CLI and curl.
- Browser
- Download file 1.51 kB
-
https://huggingface.co/spaces/tegbindra/edutrack-dashboard/resolve/main/script.js
- Command line
-
hf download hf://spaces/tegbindra/edutrack-dashboard/script.js
-
curl -L -o script.js https://huggingface.co/spaces/tegbindra/edutrack-dashboard/resolve/main/script.js
1.51 kB
| document.addEventListener('DOMContentLoaded', () => { | |
| // Initialize tooltips | |
| const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); | |
| tooltipTriggerList.map(function (tooltipTriggerEl) { | |
| return new bootstrap.Tooltip(tooltipTriggerEl); | |
| }); | |
| // Sample data for charts (would be replaced with real data) | |
| const scoreData = { | |
| labels: ['90-100', '80-89', '70-79', '60-69', 'Below 60'], | |
| datasets: [{ | |
| label: 'Students', | |
| data: [35, 65, 25, 10, 5], | |
| backgroundColor: '#4f46e5', | |
| borderColor: '#4f46e5', | |
| borderWidth: 1 | |
| }] | |
| }; | |
| const subjectData = { | |
| labels: ['English', 'Punjabi', 'Hindi', 'Math', 'Science'], | |
| datasets: [ | |
| { | |
| label: 'Highest Score', | |
| data: [100, 100, 100, 100, 100], | |
| backgroundColor: '#10b981', | |
| borderColor: '#10b981', | |
| borderWidth: 1 | |
| }, | |
| { | |
| label: 'Lowest Score', | |
| data: [63, 51, 39, 38, 44], | |
| backgroundColor: '#ef4444', | |
| borderColor: '#ef4444', | |
| borderWidth: 1 | |
| } | |
| ] | |
| }; | |
| // Function to initialize charts (placeholder for actual chart library implementation) | |
| function initCharts() { | |
| console.log('Charts would be initialized here with data:', { scoreData, subjectData }); | |
| } | |
| initCharts(); | |
| }); |