Loading…
Hover · Click · Scroll to zoom
This embed fetches VizSpecs from the API and lets the user switch between them.
Unlike the minimal embed, the spec is not hardcoded — it is loaded dynamically via
api.php?action=viz&id=…. Switching the selector reloads the
visualization without a page refresh.
dataset/{id}/viz-*.json. The API serves them on request.
onaViz('viz-id') with a string triggers the
normal API fetch path. No loadInlineSpec() call needed.
api.php?action=vizslist&dataset=… returns all
available specs for a dataset. The selector calls switchViz(id) — built into the engine.
spec, colorAttr, sizeAttr) to show what is active.
BA_medium/viz-default from the API.
The VizSpec is stored on disk as a JSON file, not hardcoded in the page.
viz-*.json files to dataset/BA_medium/.
They will appear in the switcher automatically without code changes.