Public
Edited
Apr 1, 2023
Insert cell
Insert cell
Insert cell
Insert cell
G_table.hot.addHook('afterChange', calculate_fx)
Insert cell
G_table.hot.pluginHookBucket
Insert cell
function calculate_fx(C) {
C?.forEach(([row, col, oldValue, newValue], O) => {
console.log("bar(): " + (new Date).toString().substring(16,24))
mutable OC = OC + "\n" + `${col}[${row}] := ${G_table.hot.getDataAtCell(row,col)}`
console.log("update(): " + (new Date).toString().substring(16,24))
if (["xL","xR"].includes(col)) {
;
}
})
}
Insert cell
G_table = table(grid,
{className: 'htCenter',
afterChange: (changes) => {
changes?.forEach(([row, prop, oldValue, newValue]) => {
mutable OC = `${prop}[${row}] : ${oldValue} > ${newValue}`
});
}
})
Insert cell
Insert cell
Insert cell
viewof Bchange = Inputs.button("change")
Insert cell
{
Bchange;
console.log((new Date).toString().substring(16,24))
return "Button[change] (does nothing)"
}
Insert cell
viewof montr = Inputs.text({value:"1 1 5", label:"Monitor", disabled:!true})
Insert cell
Insert cell
{
let r,c,v
[r,c,v] = montr.split(/ /).map(x => Number(x))
G_table.hot.setDataAtCell(G_table.hot.countRows()-1, G_table.hot.countCols()-1, v)
return "(" + r + "," + c + ")=" + G_table.hot.getDataAtCell(r-1,c-1).toString()
+ ` (nr,nc)=(${G_table.hot.countRows()},${G_table.hot.countRows()}) v=${v}`
/*+ " " + + " " + G_table.hot.countCols()
" " + G_table.hot.countSourceRows() +
" " + G_table.hot.countSourceCols() +
*/
}
Insert cell
viewof Bfoo = Inputs.button("foo")
Insert cell
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