The user wants a developer empathy analytics dashboard. This is an internal tool that would help engineering managers and team leads understand:
- Toil Hotspots - Areas where developers are spending excessive time on repetitive, manual work
- Support Queries - Types and volumes of questions/requests developers are fielding
- Satisfaction Signals - Metrics indicating developer happiness/satisfaction
Let me think about the design:
Visual Design:
- Modern dark theme (developers love dark mode)
- Clean, data-focused layout
- Color scheme: Dark backgrounds with accent colors for different data types
- Professional, not flashy but engaging
Data Points to Visualize:
-
Toil Hotspots:
- Manual deployments frequency
- Time spent on debugging
- Repetitive ticket types
- Documentation gaps
-
Support Queries:
- Volume over time
- Categories (API issues, deployment help, access requests, etc.)
- Response times
- Peak hours
-
Satisfaction Signals:
- Survey scores
- Sprint velocity trends
- PR review turnaround
- Code review sentiment
Interactive Elements (3+ required):
- Animated charts and graphs
- Hover effects on data points showing details
- Clickable category filters
- Animated counters for metrics
- Particle/flow background for visual interest
- Interactive time range selector
Layout:
- Header with key summary metrics
- Main grid with different visualization panels
- Each panel has animated data displays
- Dynamic background with subtle movement
Let me create a comprehensive single-file HTML dashboard with:
- Dark theme with cyan/teal accents (avoiding purple!)
- Animated counters
- Interactive hover states
- Animated bar charts
- Heatmap for toil hotspots
- Line charts for trends
- Animated background with subtle particles
I'll use Canvas for custom visualizations and CSS animations for smooth transitions.
Developer Empathy Analytics Dashboard
A modern, dark-themed dashboard to visualize developer pain points, support load, and team well-being signals. Here's my approach:
Design Philosophy:
- Dark theme optimized (developers prefer dark mode)
- Teal/cyan accent colors for positive signals, coral/amber for warning hotspots
- Clean data visualization with animated reveals
- Interactive elements throughout
Key Features:
- Animated metric counters with smooth transitions
- Interactive toil heatmap (click days for details)
- Hoverable bar charts with tooltips
- Animated satisfaction trend line
- Real-time particle background for visual depth
- Filterable support query categories
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Developer Empathy Analytics</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg-primary: #0d1117;
--bg-secondary: #161b22;
--bg-tertiary: #21262d;
--border: #30363d;
--text-primary: #e6edf3;
--text-secondary: #8b949e;
--accent-teal: #3fb950;
--accent-cyan: #58a6ff;
--accent-coral: #f78166;
--accent-amber: #d29922;
--accent-purple: #a371f7;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
overflow-x: hidden;
}
#particle-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}
.dashboard {
position: relative;
z-index: 1;
max-width: 1400px;
margin: 0 auto;
padding: 24px;
}
header {
margin-bottom: 32px;
}
.header-top {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
h1 {
font-size: 28px;
font-weight: 600;
background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.time-filter {
display: flex;
gap: 8px;
}
.time-btn {
padding: 8px 16px;
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 6px;
color: var(--text-secondary);
cursor: pointer;
transition: all 0.2s;
font-size: 13px;
}
.time-btn:hover, .time-btn.active {
background: var(--bg-tertiary);
color: var(--text-primary);
border-color: var(--accent-cyan);
}
.subtitle {
color: var(--text-secondary);
font-size: 14px;
}
.metrics-row {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
margin-bottom: 24px;
}
.metric-card {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
position: relative;
overflow: hidden;
transition: transform 0.3s, border-color 0.3s;
}
.metric-card:hover {
transform: translateY(-4px);
border-color: var(--accent-cyan);
}
.metric-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
}
.metric-card.toil::before { background: var(--accent-coral); }
.metric-card.support::before { background: var(--accent-cyan); }
.metric-card.satisfaction::before { background: var(--accent-teal); }
.metric-card.velocity::before { background: var(--accent-amber); }
.metric-label {
font-size: 12px;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 8px;
}
.metric-value {
font-size: 36px;
font-weight: 700;
margin-bottom: 8px;
}
.metric-card.toil .metric-value { color: var(--accent-coral); }
.metric-card.support .metric-value { color: var(--accent-cyan); }
.metric-card.satisfaction .metric-value { color: var(--accent-teal); }
.metric-card.velocity .metric-value { color: var(--accent-amber); }
.metric-change {
font-size: 13px;
display: flex;
align-items: center;
gap: 4px;
}
.metric-change.positive { color: var(--accent-teal); }
.metric-change.negative { color: var(--accent-coral); }
.grid-layout {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 24px;
}
.panel {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
padding: 20px;
margin-bottom: 24px;
}
.panel-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.panel-title {
font-size: 16px;
font-weight: 600;
}
.panel-badge {
font-size: 11px;
padding: 4px 8px;
border-radius: 12px;
background: var(--bg-tertiary);
color: var(--text-secondary);
}
/* Toil Heatmap */
.heatmap-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 4px;
}
.heatmap-day {
aspect-ratio: 1;
border-radius: 4px;
cursor: pointer;
transition: transform 0.2s, filter 0.2s;
position: relative;
}
.heatmap-day:hover {
transform: scale(1.2);
filter: brightness(1.3);
z-index: 10;
}
.heatmap-day.low { background: #0e4429; }
.heatmap-day.medium { background: #006d32; }
.heatmap-day.high { background: #26a641; }
.heatmap-day.critical { background: #39d353; }
.heatmap-legend {
display: flex;
align-items: center;
gap: 8px;
margin-top: 16px;
font-size: 12px;
color: var(--text-secondary);
}
.legend-item {
display: flex;
align-items: center;
gap: 4px;
}
.legend-dot {
width: 12px;
height: 12px;
border-radius: 2px;
}
/* Bar Chart */
.bar-chart {
display: flex;
flex-direction: column;
gap: 12px;
}
.bar-row {
display: flex;
align-items: center;
gap: 12px;
}
.bar-label {
width: 100px;
font-size: 13px;
color: var(--text-secondary);
text-align: right;
}
.bar-container {
flex: 1;
height: 24px;
background: var(--bg-tertiary);
border-radius: 4px;
overflow: hidden;
position: relative;
}
.bar-fill {
height: 100%;
border-radius: 4px;
transition: width 1s ease-out;
position: relative;
cursor: pointer;
}
.bar-fill:hover::after {
content: attr(data-value);
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
font-size: 11px;
font-weight: 600;
color: var(--bg-primary);
}
.bar-fill.infra { background: linear-gradient(90deg, var(--accent-coral), #ff9580); }
.bar-fill.deploy { background: linear-gradient(90deg, var(--accent-amber), #f0b72f); }
.bar-fill.testing { background: linear-gradient(90deg, var(--accent-cyan), #7cb8ff); }
.bar-fill.docs { background: linear-gradient(90deg, var(--accent-teal), #5fdc7a); }
.bar-fill.access { background: linear-gradient(90deg, var(--accent-purple), #b99ff9); }
/* Support Categories */
.category-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.category-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px;
background: var(--bg-tertiary);
border-radius: 8px;
cursor: pointer;
transition: background 0.2s, transform 0.2s;
}
.category-item:hover {
background: var(--border);
transform: translateX(4px);
}
.category-info {
display: flex;
align-items: center;
gap: 12px;
}
.category-icon {
width: 32px;
height: 32px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
}
.category-icon.api { background: rgba(88, 166, 255, 0.2); color: var(--accent-cyan); }
.category-icon.deploy { background: rgba(247, 129, 102, 0.2); color: var(--accent-coral); }
.category-icon.access { background: rgba(210, 153, 34, 0.2); color: var(--accent-amber); }
.category-icon.debug { background: rgba(63, 185, 80, 0.2); color: var(--accent-teal); }
.category-icon.other { background: rgba(139, 148, 158, 0.2); color: var(--text-secondary); }
.category-name {
font-size: 14px;
}
.category-count {
font-size: 13px;
color: var(--text-secondary);
}
/* Satisfaction Line Chart */
.line-chart-container {
height: 200px;
position: relative;
}
#satisfaction-chart {
width: 100%;
height: 100%;
}
/* Pulse Animation */
@keyframes pulse {
0%, 100% { opacity: 0.4; }
50% { opacity: 1; }
}
.pulse {
animation: pulse 2s infinite;
}
/* Detail Modal */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(4px);
display: none;
align-items: center;
justify-content: center;
z-index: 100;
}
.modal-overlay.active {
display: flex;
}
.modal {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
padding: 24px;
max-width: 400px;
width: 90%;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.modal-title {
font-size: 18px;
font-weight: 600;
}
.modal-close {
background: none;
border: none;
color: var(--text-secondary);
cursor: pointer;
font-size: 20px;
padding: 4px;
}
.modal-close:hover {
color: var(--text-primary);
}
.modal-content p {
color: var(--text-secondary);
margin-bottom: 12px;
font-size: 14px;
}
.modal-stat {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid var(--border);
}
.modal-stat:last-child {
border-bottom: none;
}
/* Recent Signals */
.signals-list {
display: flex;
flex-direction: column;
gap: 8px;
max-height: 300px;
overflow-y: auto;
}
.signal-item {
display: flex;
gap: 12px;
padding: 12px;
background: var(--bg-tertiary);
border-radius: 8px;
border-left: 3px solid;
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(-20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.signal-item.positive { border-color: var(--accent-teal); }
.signal-item.warning { border-color: var(--accent-amber); }
.signal-item.negative { border-color: var(--accent-coral); }
.signal-icon {
width: 24px;
height: 24px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
flex-shrink: 0;
}
.signal-item.positive .signal-icon { background: rgba(63, 185, 80, 0.2); color: var(--accent-teal); }
.signal-item.warning .signal-icon { background: rgba(210, 153, 34, 0.2); color: var(--accent-amber); }
.signal-item.negative .signal-icon { background: rgba(247, 129, 102, 0.2); color: var(--accent-coral); }
.signal-content {
flex: 1;
}
.signal-text {
font-size: 13px;
margin-bottom: 4px;
}
.signal-meta {
font-size: 11px;
color: var(--text-secondary);
}
/* Scrollbar */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: var(--bg-tertiary);
border-radius: 3px;
}
::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-secondary);
}
@media (max-width: 1024px) {
.metrics-row {
grid-template-columns: repeat(2, 1fr);
}
.grid-layout {
grid-template-columns: 1fr;
}
}
@media (max-width: 640px) {
.metrics-row {
grid-template-columns: 1fr;
}
.header-top {
flex-direction: column;
gap: 16px;
}
}
</style>
</head>
<body>
<canvas id="particle-canvas"></canvas>
<div class="dashboard">
<header>
<div class="header-top">
<h1>Developer Empathy Analytics</h1>
<div class="time-filter">
<button class="time-btn" data-range="7">7D</button>
<button class="time-btn active" data-range="30">30D</button>
<button class="time-btn" data-range="90">90D</button>
</div>
</div>
<p class="subtitle">Understanding developer experience through toil, support load, and satisfaction signals</p>
</header>
<div class="metrics-row">
<div class="metric-card toil">
<div class="metric-label">Toil Hours This Week</div>
<div class="metric-value" data-target="147" data-suffix="h">0h</div>
<div class="metric-change negative">
<span>↑</span> 23% vs last week
</div>
</div>
<div class="metric-card support">
<div class="metric-label">Support Queries</div>
<div class="metric-value" data-target="89" data-suffix="">0</div>
<div class="metric-change negative">
<span>↑</span> 12% vs last week
</div>
</div>
<div class="metric-card satisfaction">
<div class="metric-label">Satisfaction Score</div>
<div class="metric-value" data-target="7.2" data-suffix="/10" data-decimal="true">0/10</div>
<div class="metric-change positive">
<span>↑</span> 0.4 vs last month
</div>
</div>
<div class="metric-card velocity">
<div class="metric-label">Sprint Velocity</div>
<div class="metric-value" data-target="78" data-suffix="%">0%</div>
<div class="metric-change positive">
<span>↑</span> 5% improvement
</div>
</div>
</div>
<div class="grid-layout">
<div>
<div class="panel">
<div class="panel-header">
<span class="panel-title">Toil Hotspots by Category</span>
<span class="panel-badge">Hours spent</span>
</div>
<div class="bar-chart" id="toil-bars">
<div class="bar-row">
<span class="bar-label">Infrastructure</span>
<div class="bar-container">
<div class="bar-fill infra" data-value="42h" style="width: 0%"></div>
</div>
</div>
<div class="bar-row">
<span class="bar-label">Deployment</span>
<div class="bar-container">
<div class="bar-fill deploy" data-value="35h" style="width: 0%"></div>
</div>
</div>
<div class="bar-row">
<span class="bar-label">Testing</span>
<div class="bar-container">
<div class="bar-fill testing" data-value="28h" style="width: 0%"></div>
</div>
</div>
<div class="bar-row">
<span class="bar-label">Documentation</span>
<div class="bar-container">
<div class="bar-fill docs" data-value="24h" style="width: 0%"></div>
</div>
</div>
<div class="bar-row">
<span class="bar-label">Access Issues</span>
<div class="bar-container">
<div class="bar-fill access" data-value="18h" style="width: 0%"></div>
</div>
</div>
</div>
</div>
<div class="panel">
<div class="panel-header">
<span class="panel-title">Weekly Toil Distribution</span>
<span class="panel-badge">Last 8 weeks</span>
</div>
<div class="heatmap-grid" id="heatmap"></div>
<div class="heatmap-legend">
<span>Less</span>
<div class="legend-item"><div class="legend-dot low"></div></div>
<div class="legend-item"><div class="legend-dot medium"></div></div>
<div class="legend-item"><div class="legend-dot high"></div></div>
<div class="legend-item"><div class="legend-dot critical"></div></div>
<span>More</span>
</div>
</div>
<div class="panel">
<div class="panel-header">
<span class="panel-title">Satisfaction Trend</span>
<span class="panel-badge">30 day rolling</span>
</div>
<div class="line-chart-container">
<canvas id="satisfaction-chart"></canvas>
</div>
</div>
</div>
<div>
<div class="panel">
<div class="panel-header">
<span class="panel-title">Support Categories</span>
<span class="panel-badge">This week</span>
</div>
<div class="category-list" id="categories">
<div class="category-item" data-category="api">
<div class="category-info">
<div class="category-icon api">{ }</div>
<span class="category-name">API Issues</span>
</div>
<span class="category-count">24</span>
</div>
<div class="category-item" data-category="deploy">
<div class="category-info">
<div class="category-icon deploy">⬆</div>
<span class="category-name">Deploy Help</span>
</div>
<span class="category-count">18</span>
</div>
<div class="category-item" data-category="access">
<div class="category-info">
<div class="category-icon access">🔐</div>
<span class="category-name">Access Requests</span>
</div>
<span class="category-count">15</span>
</div>
<div class="category-item" data-category="debug">
<div class="category-info">
<div class="category-icon debug">🐛</div>
<span class="category-name">Debug Support</span>
</div>
<span class="category-count">12</span>
</div>
<div class="category-item" data-category="other">
<div class="category-info">
<div class="category-icon other">📋</div>
<span class="category-name">Other</span>
</div>
<span class="category-count">20</span>
</div>
</div>
</div>
<div class="panel">
<div class="panel-header">
<span class="panel-title">Recent Signals</span>
<span class="panel-badge pulse">Live</span>
</div>
<div class="signals-list" id="signals">
</div>
</div>
</div>
</div>
</div>
<div class="modal-overlay" id="modal">
<div class="modal">
<div class="modal-header">
<span class="modal-title" id="modal-title">Day Details</span>
<button class="modal-close" onclick="closeModal()">×</button>
</div>
<div class="modal-content" id="modal-content"></div>
</div>
</div>
<script>
// Particle Background
const particleCanvas = document.getElementById('particle-canvas');
const pCtx = particleCanvas.getContext('2d');
let particles = [];
function resizeParticleCanvas() {
particleCanvas.width = window.innerWidth;
particleCanvas.height = window.innerHeight;
}
class Particle {
constructor() {
this.reset();
}
reset() {
this.x = Math.random() * particleCanvas.width;
this.y = Math.random() * particleCanvas.height;
this.vx = (Math.random() - 0.5) * 0.3;
this.vy = (Math.random() - 0.5) * 0.3;
this.radius = Math.random() * 2 + 0.5;
this.alpha = Math.random() * 0.3 + 0.1;
}
update() {
this.x += this.vx;
this.y += this.vy;
if (this.x < 0 || this.x > particleCanvas.width) this.vx *= -1;
if (this.y < 0 || this.y > particleCanvas.height) this.vy *= -1;
}
draw() {
pCtx.beginPath();
pCtx.arc(this.x, this.y, this.radius, 0, Math.PI * 2);
pCtx.fillStyle = `rgba(88, 166, 255, ${this.alpha})`;
pCtx.fill();
}
}
function initParticles() {
particles = [];
const count = Math.floor((particleCanvas.width * particleCanvas.height) / 15000);
for (let i = 0; i < count; i++) {
particles.push(new Particle());
}
}
function drawParticleConnections() {
for (let i = 0; i < particles.length; i++) {
for (let j = i + 1; j < particles.length; j++) {
const dx = particles[i].x - particles[j].x;
const dy = particles[i].y - particles[j].y;
const dist = Math.sqrt(dx * dx + dy * dy);
if (dist < 100) {
pCtx.beginPath();
pCtx.moveTo(particles[i].x, particles[i].y);
pCtx.lineTo(particles[j].x, particles[j].y);
pCtx.strokeStyle = `rgba(88, 166, 255, ${0.1 * (1 - dist / 100)})`;
pCtx.stroke();
}
}
}
}
function animateParticles() {
pCtx.clearRect(0, 0, particleCanvas.width, particleCanvas.height);
particles.forEach(p => {
p.update();
p.draw();
});
drawParticleConnections();
requestAnimationFrame(animateParticles);
}
resizeParticleCanvas();
initParticles();
animateParticles();
window.addEventListener('resize', () => {
resizeParticleCanvas();
initParticles();
});
// Animated Counters
function animateCounters() {
document.querySelectorAll('.metric-value').forEach(el => {
const target = parseFloat(el.dataset.target);
const suffix = el.dataset.suffix || '';
const isDecimal = el.dataset.decimal === 'true';
const duration = 1500;
const start = performance.now();
function update(now) {
const elapsed = now - start;
const progress = Math.min(elapsed / duration, 1);
const eased = 1 - Math.pow(1 - progress, 3);
const current = target * eased;
if (isDecimal) {
el.textContent = current.toFixed(1) + suffix;
} else {
el.textContent = Math.round(current) + suffix;
}
if (progress < 1) {
requestAnimationFrame(update);
}
}
requestAnimationFrame(update);
});
}
// Bar Chart Animation
function animateBars() {
const values = [84, 70, 56, 48, 36];
document.querySelectorAll('.bar-fill').forEach((bar, i) => {
setTimeout(() => {
bar.style.width = values[i] + '%';
}, i * 150);
});
}
// Heatmap
function generateHeatmap() {
const heatmap = document.getElementById('heatmap');
heatmap.innerHTML = '';
const weeks = 8;
const days = 7;
for (let w = 0; w < weeks; w++) {
for (let d = 0; d < days; d++) {
const day = document.createElement('div');
day.className = 'heatmap-day';
const rand = Math.random();
if (rand < 0.3) day.classList.add('low');
else if (rand < 0.6) day.classList.add('medium');
else if (rand < 0.85) day.classList.add('high');
else day.classList.add('critical');
const weekNum = w + 1;
const dayNames = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
const hours = Math.floor(Math.random() * 6) + 1;
day.dataset.week = weekNum;
day.dataset.day = dayNames[d];
day.dataset.hours = hours;
day.addEventListener('click', () => showDayDetails(day));
heatmap.appendChild(day);
}
}
}
function showDayDetails(day) {
const modal = document.getElementById('modal');
const title = document.getElementById('modal-title');
const content = document.getElementById('modal-content');
title.textContent = `Week ${day.dataset.week}, ${day.dataset.day}`;
content.innerHTML = `
<p>Toil breakdown for this day:</p>
<div class="modal-stat">
<span>Infrastructure</span>
<span>${Math.floor(Math.random() * 3) + 1}h</span>
</div>
<div class="modal-stat">
<span>Deployment</span>
<span>${Math.floor(Math.random() * 2) + 1}h</span>
</div>
<div class="modal-stat">
<span>Testing</span>
<span>${Math.floor(Math.random() * 2)}h</span>
</div>
<div class="modal-stat">
<span>Total Toil</span>
<span style="color: var(--accent-coral); font-weight: 600;">${day.dataset.hours}h</span>
</div>
`;
modal.classList.add('active');
}
function closeModal() {
document.getElementById('modal').classList.remove('active');
}
document.getElementById('modal').addEventListener('click', (e) => {
if (e.target.id === 'modal') closeModal();
});
// Satisfaction Chart
function drawSatisfactionChart() {
const canvas = document.getElementById('satisfaction-chart');
const ctx = canvas.getContext('2d');
const rect = canvas.parentElement.getBoundingClientRect();
canvas.width = rect.width;
canvas.height = rect.height;
const padding = 40;
const width = canvas.width - padding * 2;
const height = canvas.height - padding * 2;
// Generate data
const points = 30;
const data = [];
for (let i = 0; i < points; i++) {
data.push(5.5 + Math.random() * 3 + (i / points) * 1.5);
}
// Draw grid
ctx.strokeStyle = '#30363d';
ctx.lineWidth = 1;
for (let i = 0; i <= 4; i++) {
const y = padding + (height / 4) * i;
ctx.beginPath();
ctx.moveTo(padding, y);
ctx.lineTo(canvas.width - padding, y);
ctx.stroke();
ctx.fillStyle = '#8b949e';
ctx.font = '11px sans-serif';
ctx.textAlign = 'right';
ctx.fillText((10 - i * 2.5).toFixed(1), padding - 8, y + 4);
}
// Animated line drawing
let progress = 0;
function animate() {
ctx.clearRect(padding, 0, width + padding, canvas.height);
// Redraw grid
ctx.strokeStyle = '#30363d';
for (let i = 0; i <= 4; i++) {
const y = padding + (height / 4) * i;
ctx.beginPath();
ctx.moveTo(padding, y);
ctx.lineTo(canvas.width - padding, y);
ctx.stroke();
}
// Draw line
const drawPoints = Math.floor(data.length * progress);
if (drawPoints > 1) {
ctx.beginPath();
ctx.strokeStyle = '#3fb950';
ctx.lineWidth = 2;
ctx.lineCap = 'round';
ctx.lineJoin = 'round';
for (let i = 0; i < drawPoints; i++) {
const x = padding + (width / (points - 1)) * i;
const y = padding + height - (data[i] / 10) * height;
if (i === 0) ctx.moveTo(x, y);
else ctx.lineTo(x, y);
}
ctx.stroke();
// Gradient fill
const gradient = ctx.createLinearGradient(0, padding, 0, padding + height);
gradient.addColorStop(0, 'rgba(63, 185, 80, 0.3)');
gradient.addColorStop(1, 'rgba(63, 185, 80, 0)');
ctx.lineTo(padding + (width / (points - 1)) * (drawPoints - 1), padding + height);
ctx.lineTo(padding, padding + height);
ctx.closePath();
ctx.fillStyle = gradient;
ctx.fill();
// Draw point at end
const lastX = padding + (width / (points - 1)) * (drawPoints - 1);
const lastY = padding + height - (data[drawPoints - 1] / 10) * height;
ctx.beginPath();
ctx.arc(lastX, lastY, 4, 0, Math.PI * 2);
ctx.fillStyle = '#3fb950';
ctx.fill();
ctx.strokeStyle = '#0d1117';
ctx.lineWidth = 2;
ctx.stroke();
}
progress += 0.02;
if (progress <= 1) {
requestAnimationFrame(animate);
}
}
animate();
}
// Recent Signals
const signalData = [
{ type: 'positive', text: 'PR review time improved by 23%', meta: 'Platform Team • 2h ago', icon: '↑' },
{ type: 'warning', text: 'CI/CD pipeline delays detected', meta: 'Infrastructure • 4h ago', icon: '!' },
{ type: 'positive', text: 'New dev onboarding feedback: 8.5/10', meta: 'HR Analytics • 5h ago', icon: '★' },
{ type: 'negative', text: 'High context switching reported', meta: 'Survey Response • 6h ago', icon: '↓' },
{ type: 'positive', text: 'Documentation usage up 45%', meta: 'Knowledge Base • 8h ago', icon: '📖' },
{ type: 'warning', text: 'Meeting load above threshold', meta: 'Calendar Analytics • 12h ago', icon: '⏰' }
];
function renderSignals() {
const container = document.getElementById('signals');
container.innerHTML = '';
signalData.forEach((signal, i) => {
setTimeout(() => {
const item = document.createElement('div');
item.className = `signal-item ${signal.type}`;
item.innerHTML = `
<div class="signal-icon">${signal.icon}</div>
<div class="signal-content">
<div class="signal-text">${signal.text}</div>
<div class="signal-meta">${signal.meta}</div>
</div>
`;
container.appendChild(item);
}, i * 200);
});
}
// Time Filter
document.querySelectorAll('.time-btn').forEach(btn => {
btn.addEventListener('click', function() {
document.querySelectorAll('.time-btn').forEach(b => b.classList.remove('active'));
this.classList.add('active');
// Re-animate with new "data"
animateCounters();
animateBars();
generateHeatmap();
drawSatisfactionChart();
renderSignals();
});
});
// Category click handler
document.querySelectorAll('.category-item').forEach(item => {
item.addEventListener('click', function() {
const category = this.dataset.category;
const categoryNames = {
api: 'API Issues',
deploy: 'Deployment Help',
access: 'Access Requests',
debug: 'Debug Support',
other: 'Other Queries'
};
const modal = document.getElementById('modal');
const title = document.getElementById('modal-title');
const content = document.getElementById('modal-content');
title.textContent = categoryNames[category];
content.innerHTML = `
<p>Recent ${categoryNames[category].toLowerCase()} this week:</p>
<div class="modal-stat">
<span>Total queries</span>
<span>${this.querySelector('.category-count').textContent}</span>
</div>
<div class="modal-stat">
<span>Avg resolution time</span>
<span>${Math.floor(Math.random() * 30) + 10} min</span>
</div>
<div class="modal-stat">
<span>Escalation rate</span>
<span>${Math.floor(Math.random() * 20) + 5}%</span>
</div>
`;
modal.classList.add('active');
});
});
// Initialize
setTimeout(() => {
animateCounters();
animateBars();
generateHeatmap();
drawSatisfactionChart();
renderSignals();
}, 300);
// Handle resize for chart
window.addEventListener('resize', () => {
drawSatisfactionChart();
});
</script>
</body>
</html>
Key Features Implemented:
Visual Elements
- Dark theme with teal/cyan positive signals and coral/amber warnings
- Animated particle background with connection lines for visual depth
- Smooth counter animations on all metric cards
- Gradient bar charts with hover tooltips showing exact values
Interactive Components
- Time range filter (7D/30D/90D) - re-animates all visualizations
- Clickable heatmap days - shows detailed toil breakdown modal
- Support category cards - click to see resolution metrics
- Animated satisfaction trend chart - draws progressively
- Live signal feed - cascading animation on load
Data Visualized
- Toil Hotspots: Infrastructure, Deployment, Testing, Documentation, Access
- Weekly distribution heatmap: 8-week view with intensity levels
- Support query categories: With counts and click-for-details
- Satisfaction trend: 30-day rolling average with animated line
- Recent signals: Live feed of positive/warning/negative indicators