<%= overview.since ? `Counting since ${overview.since.slice(0, 10)}` : 'Nothing counted yet: stats start with the next stream.' %>
· <%= hiddenCount %> hidden bot<%= hiddenCount === 1 ? '' : 's' %> left out ⓘ
<% if (msg) { %>
<%= msg %>
<% } %>
<% if (se.configured) { %>
<% } %>
<%= overview.viewers.toLocaleString() %>
viewers seen
<%= overview.messages.toLocaleString() %>
chat messages
<%= overview.watchHours.toLocaleString() %>
hours watched
<%= overview.streams %>
streams
<%= overview.checkins.toLocaleString() %>
check-ins
<%
// one single-series bar chart (no legend: the title names it); x = last 30 days
const chart = (title, key, unit) => {
const W = 600, H = 150, L = 34, B = 18, T = 8, n = perDay.length, max = Math.max(1, ...perDay.map(d => d[key]));
const nice = (() => { const p = Math.pow(10, Math.floor(Math.log10(max))); return [1, 2, 2.5, 5, 10].map(m => m * p).find(v => v >= max); })();
const slot = (W - L) / n, bw = Math.max(2, slot - 2), y = v => T + (H - T - B) * (1 - v / nice);
let s = `