Public
Edited
Jun 6, 2022
1 star
Insert cell
# Manipulating progress bars
Insert cell
progressBar = html`<progress max="100" value=0></progress>`
Insert cell
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
Insert cell
progressBar
Insert cell
async function manipulateProgressBar(progressBar) {
for (let i=0; i<100; i++) {
await sleep(10);
progressBar.value = i/100 * 100;
}
}
Insert cell
manipulateProgressBar(progressBar);
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