No description
  • TypeScript 100%
Find a file
2026-11-21 18:15:00 +01:00
.gitignore Version 2 2026-09-30 10:21:17 +02:00
deno.jsonc Version 2 2026-09-30 10:21:17 +02:00
Plotly.md Add per-trace queries 2026-11-21 18:15:00 +01:00
plotly.plug.js Add per-trace queries 2026-11-21 18:15:00 +01:00
plotly.plug.yaml First version 2025-09-21 12:27:42 +02:00
plotly.ts Add per-trace queries 2026-11-21 18:15:00 +01:00
plotly_core.test.ts Add per-trace queries 2026-11-21 18:15:00 +01:00
plotly_core.ts Add per-trace queries 2026-11-21 18:15:00 +01:00
README.md Update documentation 2026-09-30 18:06:12 +02:00

SilverBullet plug: Plotly

Interactive Plotly visualizations inside SilverBullet via a plotly code widget: a ```plotly fenced block whose body is YAML.

Using the plug? See Plotly.md for every option, mode and example. This README is for development.

Layout

File Role
plotly_core.ts Pure logic: validation, defaults, traces, layout, query expansion. No syscalls, so it is unit tested.
plotly.ts Widget entry point: syscalls, query execution, script generation.
plotly_core.test.ts Deno tests for the above.
plotly.plug.js Build artifact, committed — the file users install.

Keep decisions about what a chart looks like in plotly_core.ts; only plotly.ts should touch syscalls or generate code. Config errors render as an inline "Plotly error" widget — the plug never throws.

Development

Needs Deno 2.x.

deno task check      # type check
deno task test       # unit tests
deno task lint       # lint
deno task fmt        # format
deno task build      # compile plotly.plug.js

After changing a chart, rebuild and commit the artifact with the sources. The build is reproducible, so a dirty diff after deno task build means the committed plug is stale.