Published unlisted
Edited
Feb 4, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`## Attempt to gather samples`
Insert cell
import {button} from "@severo/inputs-setter"
Insert cell
{
const form = html`<form onsubmit="return false;">
<button name=collect>collect sample</button>
</form>`;
form.collect.onclick = () => {
console.log('click');
myChromaSamples.data.push(Date.now());
// myChromaSamples.data.push(chroma); // this breaks. In devtools, it says "ResizeObserver loop limit exceeded".
console.log(myChromaSamples);
};
return form;
}
Insert cell
myChromaSamples = ({ data: [] })

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
renderNote = (value, idx) => {
const div = html`<div>${scale[idx]}</div>`;
div.style.backgroundColor = `rgba(0,${Math.round(255 * value)},0,1)`;
div.style.textAlign = "center";
div.style.float = "left";
div.style.width = "2.5em";
div.style.border = "1px solid #333";
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