Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 39 additions & 3 deletions dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ <h3>Proposed Solution</h3>
<section class="dashboard-card">
<h2>Demo Visualization</h2>
<div class="chart-card">
<p>Chart placeholders will appear here once analytics are implemented.</p>
<div class="chart-placeholder">Bar / Line Graphs</div>
<p>Interactive scanner threat analysis charts:</p>
<canvas id="analyticsChart" style="max-height: 250px; width: 100%;"></canvas>
</div>
</section>

Expand Down Expand Up @@ -89,6 +89,42 @@ <h4>Navigation</h4>
</footer>
</div>

<script src="script.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
document.addEventListener("DOMContentLoaded", () => {
const ctx = document.getElementById('analyticsChart').getContext('2d');
new Chart(ctx, {
type: 'bar',
data: {
labels: ['Safe Scan', 'Malware Detected', 'Phishing Detected', 'Unwanted App'],
datasets: [{
label: 'Threat Identifications',
data: [65, 12, 19, 3],
backgroundColor: [
'rgba(0, 255, 180, 0.6)',
'rgba(248, 113, 113, 0.6)',
'rgba(251, 191, 36, 0.6)',
'rgba(59, 130, 246, 0.6)'
],
borderColor: [
'rgba(0, 255, 180, 1)',
'rgba(248, 113, 113, 1)',
'rgba(251, 191, 36, 1)',
'rgba(59, 130, 246, 1)'
],
borderWidth: 1
}]
},
options: {
responsive: true,
scales: {
y: {
beginAtZero: true
}
}
}
});
});
</script>
</body>
</html>