Public
Edited
Mar 23, 2024
1 fork
Importers
19 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
responsiveExample
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
logicExample = {
// Connect timeseries chart to plot
Inputs.bind(viewof gridPanelExample.elements.plot.view.data, viewof tsData);

// Connect logs to console
Inputs.bind(viewof gridPanelExample.elements.console.view, viewof logs);

// On button click
let playing = true;
const startStopListener = () => {
if (playing) {
viewof logs.value = "> stopping\n" + viewof logs.value;
} else {
viewof logs.value = "> starting\n" + viewof logs.value;
}
playing = !playing;
viewof tsDataRunning.value = playing;
viewof gridPanelExample.elements.stopstart.view.label.value = playing
? md`⏹`
: md`▶️`;
viewof logs.dispatchEvent(new Event("input", { bubble: true }));
};
viewof gridPanelExample.elements.stopstart.view.result.addEventListener(
"input",
startStopListener
);
invalidation.then(() =>
viewof gridPanelExample.elements.stopstart.view.result.removeEventListener(
"input",
startStopListener
)
);
}
Insert cell
Insert cell
32 * 12
Insert cell
width / 3 / 12
Insert cell
Insert cell
Insert cell
Insert cell
viewof dynamicTimeseriesExample = dynamicTimeseries([], {
width: 300,
height: 200
})
Insert cell
Inputs.bind(viewof dynamicTimeseriesExample.data, viewof tsData)
Insert cell
Insert cell
Insert cell
Insert cell
import { footer } from "@tomlarkworthy/footer"
Insert cell
footer
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more