Loading the documentation…

Author a custom visual with AI

The Studio for a custom visual has an assistant column, the Custom Visual AI panel, that writes and edits the visual's code for you. Use it to start a visual from a description, rework code you already have, or fix something a check has flagged; every change it makes lands in the editor for you to review first. If you are new to custom visuals, start with Custom visuals and the visual library.

Ask the assistant to write the code

  1. Open the tile's Studio from Edit code. The assistant column sits on the right; it is open by default when you may use it, and the Studio remembers whether you keep it open. While it loads, the column reads Loading assistant.
  2. Describe what the visual should do: the fields to show, the way it should look, and anything to avoid. The assistant reads the tile before it writes, so it starts from its code, fields and data.
  3. Read the reply and the steps it took. Each step appears as its own card under the reply; how each card reads is explained in Building custom visuals with the assistant.
  4. Review the change in the editor, then choose Apply or press Ctrl+Enter. Apply puts the code on the tile; saving the report shares it.

The conversation is attached to the tile it was opened from, or to the library visual when you opened it from the library's Edit code; it cannot edit anything else. The Report Builder can also hand a tile over to Custom Visual AI as part of a job; see Limits and refusals.

What the assistant can do

How it edits the code

Roles, fields and options

Review before the tile changes

Previews the assistant can run

What the checks look for

Limits and refusals

A refused or timed-out step never changes the visual: no part of it is applied, the tile keeps the code it had, and the reply says why.

Start from a chart you already have

When a native chart is converted into a custom visual, the assistant's first turn comes seeded: it receives the chart's configuration, the fields it used, and, when the chart could be captured, a picture of how it renders today. Ask it to improve the visual from there. The conversion itself is described in Convert a chart to a custom visual.

Questions, answered

Who can use the assistant while building a custom visual?

You need the DataPrism Custom Visual Author permission, which also brings Use DataPrism AI, and edit access to the report. Without it the assistant column is not available; ask an administrator to add the permission to your role. See Who can do what in DataPrism.

Do the assistant's changes go straight onto the tile?

No. Every change lands in the editor as an unapplied edit, and the tile changes only when you choose Apply; saving the report then shares it. See The custom visual Studio for the apply and save flow.

The banner says the AI works from the applied code. What does that mean?

The assistant reads the code applied to the tile, not edits still sitting in the editor. With unapplied edits you see You have unapplied edits; the AI works from the applied code. Apply your edits first if you want the assistant to build on them.

Why did the assistant say the visual studio is not connected?

An edit travels from the conversation to the Studio tab that holds your tile, so it needs a live Studio connection. Open the tile in the Studio with the Custom Visual AI panel open and ask again.

The assistant asked me to drag a field onto the tile. Why can it not add it itself?

The assistant never changes the report's fields; it only binds the fields already in the tile's Data well to the visual's data roles. When the code needs another field, it names one from the fields the report offers and you drag it in; the assistant continues once the field is bound.

Is there a limit to how much the assistant can change in one turn?

Yes. One turn can make at most 60 operations on one visual, and reads count too; fetching a worked example does not. When a turn reaches the limit, it asks you to continue in a new message, and the next turn has a fresh budget, so split a large rework across a few messages.

The assistant reported a timeout. Was anything changed?

No. The Studio must answer a step, and a preview must finish, within about 20 seconds; a step that misses it fails and no part of it is applied. Ask again and it makes a fresh attempt.

I stopped the assistant's turn or closed the Studio. What happens to what it already did?

The operation that was in flight is not applied. Steps that finished earlier stay in the editor as unapplied edits, so review them before you apply.

What is a hostile data preview for?

It replaces your rows with awkward values: long text, odd numbers, empty values and text that looks like code. It shows how the visual copes with messy data that tidy demo rows hide. Ask for a hostile preview when you want to stress the code.

Why does the assistant keep colours out of the visual's options?

Options values hold no colour literals. The assistant stores a theme token name instead, such as accent or chart-3, and your code resolves it with the theme, so the visual follows the report's style. See Custom visual options, data and limits.

Why can the assistant not edit while I impersonate another user?

Custom visual authoring is refused while you act as another user: each step re-checks the two permissions and your edit access to the report, and impersonation fails that check. End the session and open the tile's Studio again. See Impersonate a user.

The Report Builder handed a tile to Custom Visual AI. Why is nothing happening?

A round the Report Builder hands over reaches the code only while that tile's Studio is open. The Job view says so in amber, Custom Visual AI reads this in the visual studio, which must be open on the tile., and the hand-off waits with the state Custom Visual AI is waiting for the tab until you open it.