Published
Edited
Mar 28, 2019
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
messagesToShow = messages.filter(m => m.s <= counter).slice(-10)
Insert cell
Insert cell
Insert cell
Insert cell
{
const div = html`<div />`
let display;
const event = html`<h4 />`
div.append(event)
const lastEvent = eventTimeline.filter(e => e.seconds < counter).reverse()[0];
event.innerText = lastEvent ? lastEvent.Name : 'waiting for countdown';
// show countdown
if (counter < 0) {
display = html`<h1>${getSecsInCountdownFormat(counter * -1)}</h1>`
} else {
// show messages
display = html`<ul>${messagesToShow.map(m => html`<li>${m.speaker}: ${m.m}</li>`)}</ul>`;
}
div.append(display)
return div;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more