Custom visuals and the visual library

A custom visual is a report tile you write yourself, in HTML, CSS and JavaScript or from a template, and that draws the fields you put on it. You build it on a report tile, then publish it to the visual library so any report in the organisation can reuse it. This page covers what a custom visual is, how it behaves on a report, and how it moves through the library. The Studio, the sandbox, the assistant and the SDK reference have their own pages. For the built-in visual types, see Visuals.

What a custom visual is

Write a custom visual

You need edit access to the report and the Author DataPrism Custom Visuals permission. Without it, the Custom visual tile is hidden from Visualizations. See Who can do what in DataPrism.

  1. Open the report and click Edit in the report header.
  2. Open Visualizations in the side panel. Under Custom, click Custom visual. The new tile starts from a starter card: it shows {{ count() }} rows bound and, while nothing is bound, the hint "Write code to shape this visual. Add fields whenever it needs data."
  3. Add the fields the visual needs in the Data well.
  4. Click Edit code on the tile, or choose Edit code from the tile menu. The Studio opens as a full-screen popup that carries the tile's title; when the tile has no title, the popup falls back to Custom visual.
  5. Write the code, then click Apply or press Ctrl+Enter. Other people see the change after you save the report.
  6. Leave edit mode when you are done.

The tile starts on the Template tier. Switch Source tier to HTML + JS when you need JavaScript; the Libraries menu then lists the allowlisted libraries.

Make it act as a chart or a slicer

On the Visual tab, the Interactions section decides what the visual does in the report:

A new visual acts as a Visual and filters with Filter. In the slicer role, the selection choice is not offered. The Visual options section holds the controls the visual's own code declares.

For how selections elsewhere in the report work, see Filters, slicers and interactions.

On the report: the tile menu

ItemShown when
Edit codeA custom visual tile in edit mode, and you hold Author DataPrism Custom Visuals.
Convert to custom visualA native chart tile in edit mode, and you hold the authoring permission.
Copy visualA custom visual tile, in edit mode; see Copy and share custom visuals.
Paste visualAny tile in edit mode, when you hold the authoring permission.
Add to visual libraryA custom visual tile in edit mode, and you hold Publish Organization Visuals.
Disable this visualA custom visual tile in edit mode, you hold Disable DataPrism Custom Visuals, and the visual is not already disabled.
Refresh visualAny custom visual tile, in view and edit mode.

Links and embeds

Custom visuals in an exported report

When a report is exported to PowerPoint or PDF, every custom visual is captured as a picture with its page. A visual that has not finished drawing is pictured as it is, and one that is not running is captured as a placeholder; the export lists each case in its warnings. See Export reports and data for the capture warnings.

Share a visual with the library

Promoting the tile's code adds it to the library as a draft; publishing makes a version other reports can insert. The full lifecycle reference lives on Visual library.

  1. In edit mode, choose Add to visual library from the tile menu.
  2. Fill in Name (placeholder Name shown in the library, seeded from the tile name), Description and Family. When the visual declares data roles, a switch offers to store the tile's first 50 rows as sample data; sample rows drive the gallery card and the preview, and every library reader can see them.
  3. Choose Add to library. The visual is saved as a draft at version 1 and the tile is pinned to it; the confirmation adds "This tile is pinned to v1".
  4. Open the library, open the draft and check its preview. Publish it when it is ready.

If something is missing, the dialog cannot add the visual and shows Enter a name for the visual or Fix the blocking checks first.

Publish a version

Publishing a version needs Publish Organization Visuals.

  1. Open the visual in the library and choose Publish on the version you want to publish.
  2. Choose what happens to reports that use the visual:
    • Replace in all dependant reports moves every pinned tile to the new version. Each report gets one labelled version that you can restore.
    • New version, dependants stay pinned leaves reports on the version they use; they show the Update available chip.
  3. Confirm with Publish and replace when you chose to replace, or Publish otherwise.
Warning

When the version is compatible with every pinned tile, Replace in all dependant reports is selected by default. Check the choice before you publish, because those reports change as soon as you do.

Keep dependant reports up to date

Browse and manage the library

Open the library on the DataPrism page: choose the Visuals tab in the feed.

Actions on a library visual:

Insert a library visual

  1. In edit mode, open Visualizations and click Library under Custom. The Insert from the visual library picker opens.
  2. Pick a visual. The picker can show the whole organisation (Organization) or just what this report already uses (This report), and it searches names, descriptions and authors.
  3. Choose Insert v{n} onto page. The tile lands on the current page, pinned to that version.

Sizes and limits

WhatLimit
Data rolesUp to 16 roles, each binding up to 8 fields
RowsGeneral > Limits: default 1,000, maximum 100,000
Codevisual.html up to 96 KiB, visual.css up to 64 KiB, visual.js up to 128 KiB
Options schemaUp to 32 KiB
AssetsUp to 64 files per visual; 20 MB per file and 20 files per drop
Sample rowsUp to 1,000 rows and 256 KiB

Permissions

PermissionBundleWhat it allows
Author DataPrism Custom VisualsDataPrism Custom Visual Author, which also gives Use DataPrism AIWriting custom visual code, by hand or with the AI, and importing .dpvisual bundles.
Publish Organization VisualsOrganization Visuals PublisherAdding visuals to the library, publishing, deprecating, and changing or deleting visuals that other people own.
Disable DataPrism Custom VisualsDataPrism Custom Visual DisablerDisabling a visual on one report tile, or everywhere.

They are DataPrism permissions, set on a role alongside the others. Anyone with a DataPrism report permission can see published visuals in the library; drafts stay with their owner and the people who hold Publish Organization Visuals.

Questions, answered

Why can I not see the Custom visual tile or Edit code?

The Custom visual tile and Edit code are offered to people who can author custom visuals: you need the Author DataPrism Custom Visuals permission and edit access to the report. Ask an administrator to add the permission to your role. See Who can do what in DataPrism.

My changes work on my screen, but my colleagues do not see them. Why?

Apply changes the tile only in the report you have open, and a change reaches other people when the report is saved. Save the report after you apply the code.

Can I use a custom visual as a slicer?

Yes. In the Interactions section, set Acts as to Slicer. The visual then filters every tile on its first Data field, keeps its selection across pages and never filters itself.

How do I reuse a library visual in another report?

In edit mode, open Visualizations and click Library under Custom, then insert the version onto the page and map its roles in the Data well. The steps are above.

Will publishing a new version change existing reports?

Only if you publish with Replace in all dependant reports. With New version, dependants stay pinned, reports keep their version and show Update available. Replace is preselected when the version is compatible, so check the choice before you publish.

Why is Replace unavailable?

The version changes the data roles or options, so tiles that pin it would lose their bindings. Publish it as a new version; each report changes when someone updates it.

What does Update available mean on a tile?

The library has a newer published version than the one this tile uses. Open the chip to Review update, then choose Update, Update all in report or Detach; each choice saves one labelled version of the report.

Why can I not delete a library visual?

A report tile still pins it: "This visual is still pinned by report tiles. Detach them or publish a replacement first." Only the visual's owner, or a person with Publish Organization Visuals, can delete it.

Who can see the sample rows stored with a library visual?

Every library reader. Sample rows drive the gallery card and the preview, so store only rows that are safe for everyone to see.