File size: 1,509 Bytes
ccdb067
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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();
});