edutrack-dashboard / script.js
tegbindra's picture
S. NO. ROLL NO STUDENT NAME GENDER ENGLISH PUNJABI HINDI MATH STANDARD MATH BASIC SCIENCE SOCIAL SCIENCE PAINTING COMPUTER APPLICATIONS TOTAL AVERAGE SIXTH SUBJECT
ccdb067 verified
Raw History Blame Contribute Delete
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();
});