The Studio is the editing environment for one custom visual tile, or for one visual in the library. It holds the visual's files, previews your code on the tile's rows, and applies it to the report you have open. For what a custom visual is and how it is shared, see Custom visuals and the visual library.
Open the Studio
You need edit access to the report and the Author DataPrism Custom Visuals permission. Without it, Edit code is not offered. See Who can do what in DataPrism.
Open the report that holds the tile.
Choose Edit code from the tile menu. A tile that has no code yet offers Open studio on its placeholder instead.
The Studio opens beside the report, in the same tab. While it loads it reads Loading report and Loading studio. It works while the report is open: leave the report and it minimises itself; reopen the report to keep editing.
Files, tiers and libraries
The left panel is the file tree of one visual.
The files are visual.html, visual.css, visual.js, options.json and the assets/ folder.
The Source tier select chooses what makes up the visual. Template is the visual without JavaScript (visual.html, visual.css and options.json); HTML + JS adds visual.js. A new visual opens from a starter document, a small KPI strip, so you begin from working code.
With HTML + JS, the Libraries menu lists the libraries the code may load; only allowlisted libraries are offered.
A dot marks a file you have changed. If the tile's saved code also changed for a file you edited, the tree shows Tile changed for it; choose Reload from tile or Keep mine.
Edit and preview code
Code shows the editor; Preview draws the visual the way the tile does: the same rows, fields, formats, selection and filters, at the tile's size and on the tile's background. Clicks in the Preview filter the report like clicks on the tile.
Code reaches the Preview when you apply it or run it. Run in the Preview bar, or Ctrl+Enter (Cmd+Enter on a Mac) while the Preview has focus, draws your current code without applying it to the tile; in Code, Ctrl+Enter still applies.
The Preview bar says where it stands. Changes not previewed means the editor holds code the Preview has not run yet; Same rows, size and filters as the tile means it shows what the tile would. When the tile is not on the canvas, it reads Preview on the rows the tile last loaded.
The Preview keeps running when you switch between Code and Preview, so animations do not start over. When your code cannot run, the Preview keeps the last code that could and names the problem in the bar.
In Preview, Export preview downloads a PNG of what the preview shows, once it is ready.
While options.json is open in Code, the header adds JSON and Form. The Form view also holds Interactions, where Allow links decides whether the code may open https links; the host rules and refusals are in Sandbox, network and the allowlist.
If the options JSON does not parse, the form cannot open: the Studio shows the error followed by "fix the JSON before editing as a form." Fix the JSON in the JSON view and the form returns.
The editor keeps its own undo history, so Undo (Ctrl+Z) and Redo (Ctrl+Y) step through code edits rather than report changes. Findings from the code checks sit on the lines they concern, and errors from the preview appear on the file that raised them.
While an AI turn edits the visual, the Source tier select and the Libraries menu are locked and the editor is read-only: "AI is editing - the editor is read-only until the turn finishes". If you have unapplied edits, the Studio adds "You have unapplied edits; the AI works from the applied code". See Author a custom visual with AI.
Apply, and save the report
Apply (Ctrl+Enter) commits your code to the tile in the report you have open. It is available when your code differs from what the tile holds, or when the tile has no saved code yet, and it waits while an AI turn runs.
Applied code changes the open report only. Other people keep seeing the last saved version until the report is saved; the Studio does not save the report for you. When an apply is refused, the tile keeps its last applied code and the Studio shows the reason.
Publish to the library
Publish to library in the Studio header sends the tile's code to the organisation's visual library. When there is something to publish, it applies your edits and saves the report first. A tile that is not in the library yet becomes a new library visual; a tile that is already pinned to one publishes its code as that visual's next version. The choices and permissions are on Visual library.
Close the Studio safely
With edits you have not applied, closing asks first. The dialog reads Unsaved changes: "Apply them to the tile, or close and lose them." Choose Apply & Close to apply and close, or Close Anyway to close without applying.
Code that was still in the editor when the Studio went away is kept as a draft for that tile: for example, if you leave the report without closing the Studio, the next time you open the Studio a banner offers "Restore unsaved visual code from <time>?" with Restore and Dismiss. The offer appears only when the draft differs from the code on the tile, and Dismiss drops it.
Note
The draft holds code you had not applied. The tile keeps the last code you applied, and the report keeps the last version you saved.
When your applied code is on the tile and the report itself is unsaved, closing asks Save the report now?: "Saving writes a new report version; closing without saving keeps the changes in this tab only." Choose Save & Close or Close Without Saving.
Version history
History opens Version history, the code versions recorded by the report's saves; its tooltip reads "Version history - view and restore this visual's applied code". Every report save that applied this visual's code adds a version, so Apply alone does not.
Restore loads a version into the editor. It is not applied for you; review it and apply it like any other change.
Load older versions pages through earlier entries, 15 at a time.
With no versions yet, the drawer explains the rule: "A version is saved every time the report is saved with this visual's code applied. Save the report after Apply and it will appear here." If loading fails, it says "Could not load the version history."; open the drawer again.
A library visual opens in the same Studio as a tile, with the same editor, Preview and AI panel.
Open the visual library (DataPrism > Visuals) and select the visual you want to change.
Select Edit code. The button appears for people who hold Author DataPrism Custom Visuals and either own the visual or hold Manage DataPrism Organization Visuals. See Who can do what in DataPrism.
The Studio opens over the library, titled with the visual's name and the version it starts from, such as Sales wall - v3.
The Studio works on the version's own sample rows, never on a report's live data, and the Preview redraws as you type.
The files are visual.html, visual.css, visual.js and options.json; a template visual has no visual.js. There is no assets/ folder and no History here: a library visual's versions are in its Versions list.
Sample data in the header opens Sample data and options schema. Sample rows holds the rows that feed the library thumbnail, the previews and the Studio, and every library reader can see them; Options schema drives the Options form of every tile. Apply takes your change, or Cannot apply names what is wrong.
Save to library saves your code as the next version of the visual and publishes it, the same way a pinned tile publishes: straight away when no tile uses the visual, or with a choice between Replace in all dependant reports and New version, dependants stay pinned when tiles do. Without Manage DataPrism Organization Visuals, the version is saved as a draft for a publisher to publish. With nothing changed, its tooltip reads No changes to save yet.
Closing with unsaved work asks first: Unsaved changes, "This visual has edits that are not saved to the library. Keep editing and use Save to library, or close and lose them." Choose Keep editing or Close Anyway.
Use the AI panel
The Studio can show an AI panel, labelled Custom Visual AI. On a tile it reads the tile's fields and result rows; on a library visual it reads the version's sample rows. Its changes arrive in the editor.
It opens by default when you may use it. Each tile, and each library visual, keeps one conversation: a second attempt opens the existing thread.
If the panel cannot open, it reads The AI for this visual could not be opened., or The AI for this library visual could not be opened. in the library.
In edit mode, open the tile's Studio (Edit code), and select assets/ in the file tree. The number beside assets/ counts the report's files; the Visual assets dialog opens.
Drop files onto the dialog, or click to pick them. The upload area reads Drop files here, or click to pick them and switches to Uploading.... Files upload one at a time, and one failed file reports Asset not uploaded without stopping the rest.
Reference an asset in markup or CSS as asset://file-name, or by file name in a uni.assets call; see Custom visual SDK.
With no files yet the dialog reads No assets yet; while the list loads it reads Loading visual assets. The totals line counts the files and their size, in the form {n} asset(s), {size} in total.
A file above 2 MB gets a large badge, whose tooltip reads Above 2 MB: every frame that references this asset downloads its own copy. At upload, a Large asset warning adds that a visual may transfer at most 8.0 MB of assets, and the dialog warns when the report's files would pass that budget: A visual referencing all of them would exceed the 8.0 MB transfer budget.
Each card offers Copy reference to {fileName}, Download {fileName} and Delete {fileName}. Where the dialog is picking a file for the code you are editing, Use this asset attaches it and closes the dialog.
A card that cannot render reads Could not load; a file that is gone reads File missing. Non-image files carry a binary badge.
An SVG that carries <style> or <foreignObject> is sanitised on upload; the SVG sanitised message says the stored file may render differently from the original.
Storage, naming, copying and deleting rules are on Visual assets.
Diagnostics
In the Code view, Diagnostics opens the last runtime report for your code; its tooltip reads "Last runtime report: errors, console, violations, findings". The drawer lists each phase of the run and whether it finished, the errors with their positions, content the sandbox blocked, the code findings and the console output. When the last run had errors, the button carries an error badge.
What a custom visual tile shows
The visual runs in a sandboxed frame inside its tile. A tile shows it live, paused, stopped or replaced by a placeholder. When a preview image cannot be captured for a card, the card reads Preview unavailable.
A paused tile reads Paused to keep the page responsive, over a faded snapshot of its last rendered state. Select Activate to run it again.
When a run fails, a strip appears along the bottom of the tile. Toggle diagnostics opens the tile's diagnostics drawer; Open studio jumps into the code and appears only for people who can edit the report.
In edit mode the tile is dragged by its background: the pointer shows a move cursor until you interact with it, and a drag that starts on a control inside the tile never moves the tile.
A placeholder can also mean the visual was switched off. For what that means and how it is turned back on, see Custom visuals and the visual library.
Read the tile's diagnostics drawer
Open the drawer from Toggle diagnostics on a failing tile's strip. It opens only in edit mode, on a report you can edit.
The header counts its entries, such as Diagnostics (3). The empty state reads No entries yet, and Close diagnostics closes it. An empty drawer means the tile has not reported anything yet; open it again once the visual has rendered.
Entries carry a time and one of five levels: log, warn, error, violation or host. Warnings are amber; errors and violations are red.
Questions, answered
Why does the Studio ask me to open the report?
The Studio works beside the report it belongs to, in the same tab. When the report is not open, it shows "This visual belongs to a report that is not open. Open the report to keep editing it." with an Open report action that takes you to it. If the tile itself is gone from the report, it shows "This tile is no longer in the report, so there is nothing to edit here."; use Close to dismiss it.
Why is Apply greyed out in the Studio?
Two reasons. There is nothing new to apply: your code matches what the tile holds and the tile already has saved code. Or an AI turn is running, and Apply, Undo and Redo wait until it finishes.
What does "Tile changed" mean?
The tile's saved code changed for a file you were editing, so the Studio cannot merge them silently. Reload from tile takes the tile's version of that file; Keep mine keeps your edit.
I closed the Studio with edits I had not applied. Are they lost?
Your applied code is safe: the tile keeps the last version you applied. For the rest, the close dialog asks first (Apply & Close applies the edits and closes; Close Anyway closes without applying), and code that was still in the editor when the Studio went away is kept as a draft for that tile. Open its Studio again and a banner offers "Restore unsaved visual code from <time>?" with Restore and Dismiss; Dismiss drops the draft.
Closing the Studio asked me to save the report. Why?
The tile holds code you applied this session, and the report itself has unsaved changes. The dialog Save the report now? says "Saving writes a new report version; closing without saving keeps the changes in this tab only." Choose Save & Close or Close Without Saving.
Why does History say "No versions yet"?
A version is recorded only when the report is saved with the visual's code applied; Apply alone does not create one. Save the report after Apply, and the version appears here. For how report versions work in general, see Build a report.
Why does the Preview say "Changes not previewed"?
You changed the code since the Preview last ran it, and the Preview does not redraw on every keystroke. Click Run in the Preview bar, or press Ctrl+Enter while the Preview has focus, to see your edits; Apply also updates it.
How do I open the Studio for a library visual?
Open the visual from the visual library (DataPrism > Visuals) and select Edit code. You need Author DataPrism Custom Visuals, and you must own the visual or hold Manage DataPrism Organization Visuals; if the button is not there, ask an administrator. See Who can do what in DataPrism.
Does Save to library publish the visual?
Yes, when you hold Manage DataPrism Organization Visuals: the new version becomes the library head, and when report tiles use the visual you choose whether they move to it. Without that permission the version is saved as a draft for a publisher to publish. With nothing new to save, the button is disabled and its tooltip reads No changes to save yet. See Visual library.
The tile says "Paused to keep the page responsive". What does that mean?
The report paused this visual to stay responsive, and shows a faded snapshot of its last rendered state. Select Activate to run it again.
Why can I not open the tile's diagnostics drawer?
It opens only in edit mode, on a report you can edit. Switch the report into edit mode first; if you cannot, ask an administrator for edit access.
Why does my report warn about a large asset?
A file above 2 MB is marked large, because every frame that references it downloads its own copy. The dialog also warns when the report's files would pass the 8.0 MB a visual may transfer. Compress or remove the files you do not need.