The user wants an M&A (Mergers and Acquisitions) Pipeline Analytics dashboard.
This implies a complex financial/corporate strategy tool.
Key components requested:
- Sourcing Funnel: How deals enter and move through stages.
- Win/Loss Reasons: Why deals are closed (successfully) or abandoned/lost.
- Valuation Bands: Analysis of deal values (EV/EBITDA multiples, deal size ranges).
- Synergy Realization: Post-merger tracking of cost/revenue synergies vs. targets.
Design Aesthetic:
- Vibe: Professional, data-dense, corporate finance, dark mode (usually looks better for dashboards), crisp, analytical.
- Color Palette: Dark slate/charcoal background. Accent colors: Deep blue (trust), teal/green (positive metrics), red/orange (negative/loss), gold (high value/deals).
- Font: Sans-serif, technical.
Inter or IBM Plex Sans for UI, DM Sans or Sora for headings.
Layout/Structure:
- Header: Title, date range picker, company logo placeholder.
- Top Row (KPIs): Total Deals, Total Value, Win Rate, Average Multiple.
- Row 1 (The Funnel): A visual representation of the funnel (Target Identified -> LOI -> Due Diligence -> Definitive Agreement -> Closed).
- Row 2 (Win/Loss & Valuation):
- Left: Horizontal bar chart or breakdown of why we won/lost (Strategic Fit, Price, Regulatory, etc.).
- Right: Scatter plot or Box plot showing Valuation Bands (EV/EBITDA ranges by sector).
- Row 3 (Synergy Realization):
- A specialized chart showing Target vs. Realized synergies over time or by category (Cost vs. Revenue).
- Maybe a "Waterfall" chart concept or a grouped bar chart.
Technical Implementation:
- HTML/CSS for structure and styling.
- Tailwind CSS for rapid utility styling.
- Vanilla JS for interactions (tab switching, simple chart rendering).
- Charts: Since I can't import heavy libraries easily in a single file without CDN issues or performance hits, I will simulate charts using CSS/HTML (flexbox bars) or use the HTML5 Canvas API for basic shapes. Actually, pure CSS charts look cleaner and are easier to maintain in a self-contained snippet. For the "Synergy Realization," a canvas-based chart might be better for line/area graphs, but I'll stick to CSS-based solutions for maximum reliability and sharpness, or use SVG.
Refining the Content:
- Sourcing Funnel: A vertical stack or horizontal flow showing counts dropping off.
- Win/Loss: Categorized reasons. "Price too high" is usually top for loss. "Strategic fit" for win.
- Valuation: EV/EBITDA multiples. Software (15x-20x), Manufacturing (6x-9x), etc.
- Synergies: Run-rate vs. Realized. Cost synergies usually hit faster than revenue synergies.
Step-by-Step Build Plan:
- Define CSS variables for the theme.
- Create the Grid Layout.
- Implement the KPI cards.
- Implement the Sourcing Funnel (CSS-based horizontal bar funnel).
- Implement Win/Loss analysis (Horizontal bar chart).
- Implement Valuation Bands (Box plot style or Range bars).
- Implement Synergy Tracker (Dual-axis style visualization using CSS bars or a progress indicator).
- Add interaction: Hover states, a toggle to switch between "2023" and "2024" data to show JS functionality.
Self-Correction/Refinement:
- Initial thought: Use Chart.js. Correction: Keep it lightweight. Use HTML/CSS for the charts to ensure it looks perfect without external dependencies breaking or loading slowly. It allows for pixel-perfect design matching the "Elite Finance" aesthetic.
- Synergy Section: Needs to look like a tracking dashboard. Let's use a "Progress vs Target" approach.
Drafting the Code (Mental):
- Container:
w-full max-w-7xl mx-auto p-6 bg-gray-900 text-white.
- Funnel:
divs with decreasing widths.
- Valuation: Box plot CSS
min, max, median indicators.
Let's generate the code.
M&A Pipeline Analytics Dashboard
A sophisticated, dark-mode financial analytics dashboard for tracking merger & acquisition pipelines. Features real-time funnel visualization, win/loss analysis, valuation band distribution, and synergy realization tracking.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>M&A Pipeline Analytics</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--bg-primary: #0a0f1a;
--bg-secondary: #111827;
--bg-card: #1a2332;
--bg-elevated: #222d3d;
--border: #2d3a4d;
--text-primary: #f1f5f9;
--text-secondary: #94a3b8;
--text-muted: #64748b;
--accent-gold: #d4a254;
--accent-gold-dim: rgba(212, 162, 84, 0.15);
--accent-emerald: #10b981;
--accent-emerald-dim: rgba(16, 185, 129, 0.15);
--accent-rose: #f43f5e;
--accent-rose-dim: rgba(244, 63, 94, 0.15);
--accent-blue: #3b82f6;
--accent-blue-dim: rgba(59, 130, 246, 0.15);
--accent-violet: #8b5cf6;
}
* { box-sizing: border-box; }
body {
font-family: 'DM Sans', sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
}
h1, h2, h3, h4 {
font-family: 'Space Grotesk', sans-serif;
}
.card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 12px;
}
.stat-glow-gold { box-shadow: 0 0 40px rgba(212, 162, 84, 0.1); }
.stat-glow-emerald { box-shadow: 0 0 40px rgba(16, 185, 129, 0.1); }
/* Funnel styles */
.funnel-stage {
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.funnel-stage:hover {
transform: translateX(4px);
filter: brightness(1.2);
}
/* Valuation band bars */
.val-bar {
transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Synergy progress */
.synergy-fill {
transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Animations */
@keyframes fadeSlideUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
from { opacity: 0; transform: scale(0.95); }
to { opacity: 1; transform: scale(1); }
}
.animate-in {
animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
opacity: 0;
}
.animate-scale {
animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
opacity: 0;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
@media (prefers-reduced-motion: reduce) {
.animate-in, .animate-scale {
animation: none;
opacity: 1;
}
.funnel-stage, .val-bar, .synergy-fill {
transition: none;
}
}
/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
/* Tooltip */
.tooltip {
position: relative;
}
.tooltip::after {
content: attr(data-tip);
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%) translateY(-8px);
background: var(--bg-elevated);
border: 1px solid var(--border);
padding: 6px 10px;
border-radius: 6px;
font-size: 12px;
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s;
z-index: 100;
}
.tooltip:hover::after {
opacity: 1;
}
/* Tab active state */
.tab-btn.active {
background: var(--accent-gold-dim);
color: var(--accent-gold);
border-color: var(--accent-gold);
}
</style>
</head>
<body class="min-h-screen">
<!-- Header -->
<header class="border-b border-[var(--border)] bg-[var(--bg-secondary)]">
<div class="max-w-[1400px] mx-auto px-4 sm:px-6 py-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-lg bg-gradient-to-br from-[var(--accent-gold)] to-[#b8860b] flex items-center justify-center">
<svg class="w-5 h-5 text-[var(--bg-primary)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6"/>
</svg>
</div>
<div>
<h1 class="text-lg font-semibold tracking-tight">M&A Pipeline Analytics</h1>
<p class="text-xs text-[var(--text-muted)]">Q4 2024 Performance Review</p>
</div>
</div>
<div class="flex items-center gap-3">
<div class="flex bg-[var(--bg-card)] rounded-lg p-1 border border-[var(--border)]">
<button class="tab-btn active px-3 py-1.5 text-sm rounded-md border border-transparent transition-all" data-period="q4">Q4 2024</button>
<button class="tab-btn px-3 py-1.5 text-sm rounded-md border border-transparent text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-all" data-period="ytd">YTD</button>
</div>
<button id="exportBtn" class="px-4 py-2 bg-[var(--bg-elevated)] border border-[var(--border)] rounded-lg text-sm font-medium hover:bg-[var(--border)] transition-colors flex items-center gap-2">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"/>
</svg>
Export
</button>
</div>
</div>
</header>
<main class="max-w-[1400px] mx-auto px-4 sm:px-6 py-6">
<!-- KPI Cards -->
<div class="grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
<div class="card p-4 stat-glow-gold animate-in delay-1">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-[var(--text-muted)] uppercase tracking-wide">Active Deals</span>
<span class="text-xs px-2 py-0.5 rounded-full bg-[var(--accent-emerald-dim)] text-[var(--accent-emerald)]">+12%</span>
</div>
<div class="text-3xl font-bold text-[var(--accent-gold)]" id="kpiDeals">47</div>
<div class="text-xs text-[var(--text-secondary)] mt-1">across 8 sectors</div>
</div>
<div class="card p-4 animate-in delay-2">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-[var(--text-muted)] uppercase tracking-wide">Pipeline Value</span>
<span class="text-xs px-2 py-0.5 rounded-full bg-[var(--accent-emerald-dim)] text-[var(--accent-emerald)]">+28%</span>
</div>
<div class="text-3xl font-bold" id="kpiValue">$4.2B</div>
<div class="text-xs text-[var(--text-secondary)] mt-1">total enterprise value</div>
</div>
<div class="card p-4 animate-in delay-3">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-[var(--text-muted)] uppercase tracking-wide">Win Rate</span>
<span class="text-xs px-2 py-0.5 rounded-full bg-[var(--accent-rose-dim)] text-[var(--accent-rose)]">-3%</span>
</div>
<div class="text-3xl font-bold" id="kpiWinRate">34%</div>
<div class="text-xs text-[var(--text-secondary)] mt-1">vs 37% prior quarter</div>
</div>
<div class="card p-4 stat-glow-emerald animate-in delay-4">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-[var(--text-muted)] uppercase tracking-wide">Avg. Multiple</span>
<span class="text-xs px-2 py-0.5 rounded-full bg-[var(--accent-blue-dim)] text-[var(--accent-blue)]">Stable</span>
</div>
<div class="text-3xl font-bold text-[var(--accent-emerald)]" id="kpiMultiple">8.4x</div>
<div class="text-xs text-[var(--text-secondary)] mt-1">EV/EBITDA median</div>
</div>
</div>
<!-- Main Grid -->
<div class="grid lg:grid-cols-3 gap-6">
<!-- Left Column: Funnel -->
<div class="lg:col-span-1">
<div class="card p-5 h-full animate-scale delay-2">
<h2 class="text-sm font-semibold uppercase tracking-wide text-[var(--text-muted)] mb-4">Sourcing Funnel</h2>
<div id="funnelContainer" class="space-y-3">
<!-- Funnel stages rendered by JS -->
</div>
<div class="mt-6 pt-4 border-t border-[var(--border)]">
<div class="flex justify-between text-xs">
<span class="text-[var(--text-muted)]">Conversion Rate</span>
<span class="font-semibold text-[var(--accent-gold)]">18.2%</span>
</div>
<div class="flex justify-between text-xs mt-2">
<span class="text-[var(--text-muted)]">Avg. Days to Close</span>
<span class="font-semibold">127 days</span>
</div>
</div>
</div>
</div>
<!-- Right Column -->
<div class="lg:col-span-2 space-y-6">
<!-- Win/Loss Analysis -->
<div class="card p-5 animate-scale delay-3">
<div class="flex items-center justify-between mb-4">
<h2 class="text-sm font-semibold uppercase tracking-wide text-[var(--text-muted)]">Win / Loss Analysis</h2>
<div class="flex gap-4 text-xs">
<span class="flex items-center gap-1.5">
<span class="w-2.5 h-2.5 rounded-full bg-[var(--accent-emerald)]"></span>
Wins (23)
</span>
<span class="flex items-center gap-1.5">
<span class="w-2.5 h-2.5 rounded-full bg-[var(--accent-rose)]"></span>
Losses (45)
</span>
</div>
</div>
<div class="grid md:grid-cols-2 gap-6">
<!-- Win Reasons -->
<div>
<h3 class="text-xs font-medium text-[var(--text-secondary)] mb-3">Top Win Reasons</h3>
<div id="winReasons" class="space-y-2.5">
<!-- Rendered by JS -->
</div>
</div>
<!-- Loss Reasons -->
<div>
<h3 class="text-xs font-medium text-[var(--text-secondary)] mb-3">Top Loss Reasons</h3>
<div id="lossReasons" class="space-y-2.5">
<!-- Rendered by JS -->
</div>
</div>
</div>
</div>
<!-- Valuation Bands -->
<div class="card p-5 animate-scale delay-4">
<div class="flex items-center justify-between mb-4">
<h2 class="text-sm font-semibold uppercase tracking-wide text-[var(--text-muted)]">Valuation Bands (EV/EBITDA)</h2>
<select id="sectorFilter" class="bg-[var(--bg-elevated)] border border-[var(--border)] rounded-lg px-3 py-1.5 text-xs focus:outline-none focus:border-[var(--accent-gold)]">
<option value="all">All Sectors</option>
<option value="tech">Technology</option>
<option value="healthcare">Healthcare</option>
<option value="industrial">Industrial</option>
<option value="consumer">Consumer</option>
</select>
</div>
<div id="valuationBands" class="space-y-4">
<!-- Rendered by JS -->
</div>
</div>
</div>
</div>
<!-- Synergy Realization -->
<div class="mt-6 card p-5 animate-scale delay-5">
<div class="flex flex-col md:flex-row md:items-center justify-between mb-6">
<div>
<h2 class="text-sm font-semibold uppercase tracking-wide text-[var(--text-muted)]">Synergy Realization Tracker</h2>
<p class="text-xs text-[var(--text-secondary)] mt-1">Post-merger performance across closed deals</p>
</div>
<div class="flex gap-6 mt-4 md:mt-0">
<div class="text-center">
<div class="text-2xl font-bold text-[var(--accent-emerald)]">$142M</div>
<div class="text-xs text-[var(--text-muted)]">Realized</div>
</div>
<div class="text-center">
<div class="text-2xl font-bold text-[var(--text-secondary)]">$189M</div>
<div class="text-xs text-[var(--text-muted)]">Target</div>
</div>
<div class="text-center">
<div class="text-2xl font-bold text-[var(--accent-gold)]">75%</div>
<div class="text-xs text-[var(--text-muted)]">Achievement</div>
</div>
</div>
</div>
<div id="synergyTracker" class="space-y-4">
<!-- Rendered by JS -->
</div>
</div>
</main>
<!-- Toast Notification -->
<div id="toast" class="fixed bottom-6 right-6 bg-[var(--bg-elevated)] border border-[var(--border)] px-4 py-3 rounded-lg shadow-xl transform translate-y-20 opacity-0 transition-all duration-300 flex items-center gap-3 z-50">
<svg class="w-5 h-5 text-[var(--accent-emerald)]" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
</svg>
<span class="text-sm" id="toastMessage">Data exported successfully</span>
</div>
<script>
// Dataset
const pipelineData = {
q4: {
kpis: { deals: 47, value: '$4.2B', winRate: '34%', multiple: '8.4x' },
funnel: [
{ stage: 'Target Identified', count: 312, color: '#3b82f6' },
{ stage: 'Initial Outreach', count: 187, color: '#6366f1' },
{ stage: 'NDA / CIM Reviewed', count: 98, color: '#8b5cf6' },
{ stage: 'Management Meeting', count: 54, color: '#a855f7' },
{ stage: 'LOI Submitted', count: 32, color: '#d946ef' },
{ stage: 'Due Diligence', count: 19, color: '#ec4899' },
{ stage: 'Definitive Agreement', count: 8, color: '#f43f5e' },
{ stage: 'Closed', count: 5, color: '#10b981' }
],
winReasons: [
{ reason: 'Strategic Fit', pct: 35 },
{ reason: 'Competitive Price', pct: 28 },
{ reason: 'Speed of Execution', pct: 18 },
{ reason: 'Relationship', pct: 12 },
{ reason: 'Other', pct: 7 }
],
lossReasons: [
{ reason: 'Price Too High', pct: 32 },
{ reason: 'Strategic Misalignment', pct: 24 },
{ reason: 'Regulatory Concerns', pct: 18 },
{ reason: 'Competing Bid', pct: 15 },
{ reason: 'Cultural Fit', pct: 11 }
],
valuations: {
all: [
{ sector: 'Technology', min: 8, q1: 12, median: 16, q3: 22, max: 28, deals: 18 },
{ sector: 'Healthcare', min: 6, q1: 9, median: 13, q3: 17, max: 22, deals: 11 },
{ sector: 'Industrial', min: 4, q1: 6, median: 8, q3: 11, max: 14, deals: 9 },
{ sector: 'Consumer', min: 5, q1: 7, median: 10, q3: 13, max: 16, deals: 7 },
{ sector: 'Financial', min: 7, q1: 10, median: 12, q3: 15, max: 18, deals: 6 }
],
tech: [
{ sector: 'SaaS', min: 10, q1: 14, median: 18, q3: 24, max: 32, deals: 8 },
{ sector: 'FinTech', min: 8, q1: 11, median: 15, q3: 20, max: 26, deals: 6 },
{ sector: 'Cybersecurity', min: 9, q1: 13, median: 17, q3: 23, max: 30, deals: 4 }
],
healthcare: [
{ sector: 'Pharma', min: 7, q1: 10, median: 14, q3: 18, max: 24, deals: 5 },
{ sector: 'MedTech', min: 5, q1: 8, median: 12, q3: 15, max: 19, deals: 4 },
{ sector: 'Services', min: 6, q1: 9, median: 11, q3: 14, max: 17, deals: 2 }
],
industrial: [
{ sector: 'Manufacturing', min: 4, q1: 5, median: 7, q3: 9, max: 12, deals: 5 },
{ sector: 'Logistics', min: 5, q1: 7, median: 9, q3: 12, max: 15, deals: 4 }
],
consumer: [
{ sector: 'Retail', min: 4, q1: 6, median: 8, q3: 11, max: 14, deals: 4 },
{ sector: 'Food & Bev', min: 6, q1: 8, median: 11, q3: 14, max: 17, deals: 3 }
]
},
synergies: [
{ deal: 'TechCorp Acquisition', target: 45, realized: 38, type: 'cost', status: 'on-track' },
{ deal: 'HealthFirst Merger', target: 32, realized: 28, type: 'revenue', status: 'on-track' },
{ deal: 'IndustrialCo Buyout', target: 28, realized: 19, type: 'cost', status: 'at-risk' },
{ deal: 'ConsumerBrands Deal', target: 22, realized: 20, type: 'mixed', status: 'exceeded' },
{ deal: 'FinServe Integration', target: 18, realized: 12, type: 'cost', status: 'at-risk' },
{ deal: 'LogiTech Partners', target: 15, realized: 15, type: 'revenue', status: 'exceeded' },
{ deal: 'MedEquip Expansion', target: 12, realized: 10, type: 'mixed', status: 'on-track' }
]
},
ytd: {
kpis: { deals: 156, value: '$12.8B', winRate: '36%', multiple: '8.1x' },
funnel: [
{ stage: 'Target Identified', count: 1042, color: '#3b82f6' },
{ stage: 'Initial Outreach', count: 623, color: '#6366f1' },
{ stage: 'NDA / CIM Reviewed', count: 341, color: '#8b5cf6' },
{ stage: 'Management Meeting', count: 189, color: '#a855f7' },
{ stage: 'LOI Submitted', count: 108, color: '#d946ef' },
{ stage: 'Due Diligence', count: 67, color: '#ec4899' },
{ stage: 'Definitive Agreement', count: 28, color: '#f43f5e' },
{ stage: 'Closed', count: 19, color: '#10b981' }
],
winReasons: [
{ reason: 'Strategic Fit', pct: 38 },
{ reason: 'Competitive Price', pct: 26 },
{ reason: 'Speed of Execution', pct: 16 },
{ reason: 'Relationship', pct: 14 },
{ reason: 'Other', pct: 6 }
],
lossReasons: [
{ reason: 'Price Too High', pct: 29 },
{ reason: 'Strategic Misalignment', pct: 26 },
{ reason: 'Regulatory Concerns', pct: 20 },
{ reason: 'Competing Bid', pct: 14 },
{ reason: 'Cultural Fit', pct: 11 }
],
valuations: {
all: [
{ sector: 'Technology', min: 7, q1: 11, median: 15, q3: 21, max: 26, deals: 58 },
{ sector: 'Healthcare', min: 5, q1: 8, median: 12, q3: 16, max: 21, deals: 34 },
{ sector: 'Industrial', min: 4, q1: 6, median: 8, q3: 10, max: 13, deals: 28 },
{ sector: 'Consumer', min: 5, q1: 7, median: 9, q3: 12, max: 15, deals: 22 },
{ sector: 'Financial', min: 6, q1: 9, median: 11, q3: 14, max: 17, deals: 14 }
]
},
synergies: [
{ deal: 'TechCorp Acquisition', target: 45, realized: 42, type: 'cost', status: 'on-track' },
{ deal: 'HealthFirst Merger', target: 32, realized: 35, type: 'revenue', status: 'exceeded' },
{ deal: 'IndustrialCo Buyout', target: 28, realized: 22, type: 'cost', status: 'at-risk' },
{ deal: 'ConsumerBrands Deal', target: 22, realized: 24, type: 'mixed', status: 'exceeded' },
{ deal: 'FinServe Integration', target: 18, realized: 16, type: 'cost', status: 'on-track' },
{ deal: 'LogiTech Partners', target: 15, realized: 17, type: 'revenue', status: 'exceeded' },
{ deal: 'MedEquip Expansion', target: 12, realized: 11, type: 'mixed', status: 'on-track' }
]
}
};
// State
let currentPeriod = 'q4';
let currentSector = 'all';
// DOM Elements
const funnelContainer = document.getElementById('funnelContainer');
const winReasonsContainer = document.getElementById('winReasons');
const lossReasonsContainer = document.getElementById('lossReasons');
const valuationBandsContainer = document.getElementById('valuationBands');
const synergyTrackerContainer = document.getElementById('synergyTracker');
const sectorFilter = document.getElementById('sectorFilter');
const tabBtns = document.querySelectorAll('.tab-btn');
const exportBtn = document.getElementById('exportBtn');
const toast = document.getElementById('toast');
// Render Functions
function renderFunnel(data) {
const maxCount = Math.max(...data.map(d => d.count));
funnelContainer.innerHTML = data.map((item, i) => {
const width = Math.max(20, (item.count / maxCount) * 100);
return `
<div class="funnel-stage cursor-pointer" style="animation-delay: ${i * 50}ms">
<div class="flex items-center justify-between mb-1">
<span class="text-xs text-[var(--text-secondary)]">${item.stage}</span>
<span class="text-xs font-semibold">${item.count}</span>
</div>
<div class="h-6 bg-[var(--bg-elevated)] rounded overflow-hidden">
<div class="h-full rounded transition-all duration-700"
style="width: ${width}%; background: linear-gradient(90deg, ${item.color}, ${item.color}88);">
</div>
</div>
</div>
`;
}).join('');
}
function renderWinLoss(winData, lossData) {
winReasonsContainer.innerHTML = winData.map(item => `
<div class="group">
<div class="flex justify-between text-xs mb-1">
<span class="text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors">${item.reason}</span>
<span class="font-medium text-[var(--accent-emerald)]">${item.pct}%</span>
</div>
<div class="h-2 bg-[var(--bg-elevated)] rounded-full overflow-hidden">
<div class="val-bar h-full bg-[var(--accent-emerald)] rounded-full" style="width: ${item.pct}%"></div>
</div>
</div>
`).join('');
lossReasonsContainer.innerHTML = lossData.map(item => `
<div class="group">
<div class="flex justify-between text-xs mb-1">
<span class="text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors">${item.reason}</span>
<span class="font-medium text-[var(--accent-rose)]">${item.pct}%</span>
</div>
<div class="h-2 bg-[var(--bg-elevated)] rounded-full overflow-hidden">
<div class="val-bar h-full bg-[var(--accent-rose)] rounded-full" style="width: ${item.pct}%"></div>
</div>
</div>
`).join('');
}
function renderValuations(data) {
const allData = pipelineData[currentPeriod].valuations.all;
const maxVal = Math.max(...allData.map(d => d.max));
valuationBandsContainer.innerHTML = data.map(item => {
const minPos = (item.min / maxVal) * 100;
const maxPos = (item.max / maxVal) * 100;
const q1Pos = (item.q1 / maxVal) * 100;
const q3Pos = (item.q3 / maxVal) * 100;
const medianPos = (item.median / maxVal) * 100;
return `
<div class="group hover:bg-[var(--bg-elevated)] p-3 rounded-lg transition-colors -mx-3">
<div class="flex items-center justify-between mb-2">
<span class="text-sm font-medium">${item.sector}</span>
<span class="text-xs text-[var(--text-muted)]">${item.deals} deals</span>
</div>
<div class="relative h-8">
<!-- Range line -->
<div class="absolute h-0.5 bg-[var(--border)] rounded"
style="left: ${minPos}%; width: ${maxPos - minPos}%; top: 50%; transform: translateY(-50%);"></div>
<!-- IQR box -->
<div class="absolute h-5 bg-[var(--accent-gold-dim)] border border-[var(--accent-gold)] rounded"
style="left: ${q1Pos}%; width: ${Math.max(1, q3Pos - q1Pos)}%; top: 50%; transform: translateY(-50%);"></div>
<!-- Median line -->
<div class="absolute w-1 h-6 bg-[var(--accent-gold)] rounded"
style="left: ${medianPos}%; top: 50%; transform: translateY(-50%);"></div>
<!-- Min/Max labels -->
<span class="absolute text-[10px] text-[var(--text-muted)]" style="left: ${minPos}%; top: -2px; transform: translateX(-50%)">${item.min}x</span>
<span class="absolute text-[10px] text-[var(--text-muted)]" style="left: ${maxPos}%; top: -2px; transform: translateX(-50%)">${item.max}x</span>
</div>
</div>
`;
}).join('');
}
function renderSynergies(data) {
synergyTrackerContainer.innerHTML = data.map(item => {
const pct = Math.round((item.realized / item.target) * 100);
const statusColors = {
'exceeded': 'var(--accent-emerald)',
'on-track': 'var(--accent-gold)',
'at-risk': 'var(--accent-rose)'
};
const statusLabels = {
'exceeded': 'Exceeded',
'on-track': 'On Track',
'at-risk': 'At Risk'
};
const typeLabels = {
'cost': 'Cost Synergies',
'revenue': 'Revenue Synergies',
'mixed': 'Mixed'
};
const color = statusColors[item.status];
return `
<div class="flex flex-col md:flex-row md:items-center gap-3 md:gap-6 p-3 bg-[var(--bg-elevated)] rounded-lg hover:bg-[var(--border)] transition-colors">
<div class="md:w-48 flex-shrink-0">
<div class="text-sm font-medium truncate">${item.deal}</div>
<div class="text-xs text-[var(--text-muted)]">${typeLabels[item.type]}</div>
</div>
<div class="flex-1">
<div class="flex justify-between text-xs mb-1">
<span class="text-[var(--text-secondary)]">$${item.realized}M of $${item.target}M</span>
<span class="font-semibold" style="color: ${color}">${pct}%</span>
</div>
<div class="h-2 bg-[var(--bg-card)] rounded-full overflow-hidden">
<div class="synergy-fill h-full rounded-full" style="width: ${Math.min(100, pct)}%; background: ${color}"></div>
</div>
</div>
<div class="md:w-24 flex-shrink-0">
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium"
style="background: ${color}22; color: ${color}">
${statusLabels[item.status]}
</span>
</div>
</div>
`;
}).join('');
}
function updateKPIs(kpis) {
document.getElementById('kpiDeals').textContent = kpis.deals;
document.getElementById('kpiValue').textContent = kpis.value;
document.getElementById('kpiWinRate').textContent = kpis.winRate;
document.getElementById('kpiMultiple').textContent = kpis.multiple;
}
function updateDashboard() {
const data = pipelineData[currentPeriod];
updateKPIs(data.kpis);
renderFunnel(data.funnel);
renderWinLoss(data.winReasons, data.lossReasons);
const valuations = data.valuations[currentSector] || data.valuations.all;
renderValuations(valuations);
renderSynergies(data.synergies);
}
function showToast(message) {
const toastEl = document.getElementById('toast');
document.getElementById('toastMessage').textContent = message;
toastEl.classList.remove('translate-y-20', 'opacity-0');
toastEl.classList.add('translate-y-0', 'opacity-100');
setTimeout(() => {
toastEl.classList.add('translate-y-20', 'opacity-0');
toastEl.classList.remove('translate-y-0', 'opacity-100');
}, 3000);
}
// Event Listeners
tabBtns.forEach(btn => {
btn.addEventListener('click', () => {
tabBtns.forEach(b => b.classList.remove('active'));
btn.classList.add('active');
currentPeriod = btn.dataset.period;
updateDashboard();
});
});
sectorFilter.addEventListener('change', (e) => {
currentSector = e.target.value;
const data = pipelineData[currentPeriod];
const valuations = data.valuations[currentSector] || data.valuations.all;
renderValuations(valuations);
});
exportBtn.addEventListener('click', () => {
showToast('Pipeline data exported to Excel');
});
// Intersection Observer for scroll animations
const observerOptions = {
threshold: 0.1,
rootMargin: '0px 0px -50px 0px'
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.style.opacity = '1';
entry.target.style.transform = 'translateY(0)';
}
});
}, observerOptions);
// Initialize
document.addEventListener('DOMContentLoaded', () => {
updateDashboard();
// Observe elements
document.querySelectorAll('.animate-in, .animate-scale').forEach(el => {
observer.observe(el);
});
});
</script>
</body>
</html>
Key Features
1. Sourcing Funnel
- Visualizes the full M&A pipeline from target identification to close
- Shows deal count drop-off at each stage
- Hover interactions highlight individual stages
- Displays overall conversion rate and average days to close
2. Win/Loss Analysis
- Side-by-side comparison of deal outcomes
- Horizontal bar charts showing top reasons for wins and losses
- Clear visual distinction (emerald for wins, rose for losses)
3. Valuation Bands
- Box plot visualization showing EV/EBITDA multiple distribution
- Displays min, Q1, median, Q3, and max values
- Filterable by sector (Technology, Healthcare, Industrial, Consumer)
- Deal count per sector shown
4. Synergy Realization Tracker
- Post-merger performance monitoring
- Progress bars showing realized vs. target synergies
- Status indicators: Exceeded, On Track, At Risk
- Categorizes synergy type (Cost, Revenue, Mixed)
Design Highlights
- Dark theme with gold accent for financial sophistication
- Staggered animations on load
- Period toggle (Q4 vs YTD) with instant data switching
- Export functionality with toast notification
- Responsive layout optimized for both mobile and desktop
- Accessibility-friendly with semantic HTML and focus states