Loading the documentation…

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; for the ten ready-made visuals in every library, see Built-in library 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.
Refresh visualAny custom visual tile, in view and edit mode.
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.
Publish to libraryA custom visual tile in edit mode, and you hold the authoring permission. While the report has unsaved changes it reads Save report and publish to library. See Share a visual with the library.
Disable this visualA custom visual tile in edit mode, you hold Disable DataPrism Custom Visuals, and the visual is not already disabled.

Hide the Custom or AI tag

A custom visual tile carries a Custom or AI tag in its title, or over the visual when the title is off. To hide it, select the tile, open General > Title and turn off Show visual tag. The tag then stays hidden in edit mode, in view mode and in exports. Tiles show the tag until you turn it off.

Switch to another visual type and back

You can turn a custom visual tile into another type, such as a Table, to look at its rows, then pick Custom visual in Visualizations again. The visual comes back as it was: its code, options, interactions and its link to the library. This works after the report is saved too, and switching back does not need the authoring permission. For how fields move between types, see Visuals.

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

Publish to library sends the tile's code to the library, from the tile menu or from the header of the tile's Studio. When there is something to publish, it applies unapplied edits and saves the report first. The full lifecycle reference lives on Visual library.

  1. In edit mode, choose Publish to library on a custom visual tile.
  2. A tile that is not in the library yet opens Add to visual library. Fill in Name (placeholder Name shown in the library, seeded from the tile name), Description, Family, Icon and Docs. 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 Publish to library. The visual is published at version 1 and the tile is pinned to it; the confirmation adds "This tile is pinned to v1". Without Manage DataPrism Organization Visuals, the button reads Add as a draft and the visual waits for a publisher.

A tile that is already pinned to a library visual publishes its code as the next version of that visual. When no other tile uses it, the version is published at once; when other tiles do, you choose Update everywhere or Only this tile. If you neither own the visual nor hold Manage DataPrism Organization Visuals, the tile is published as a new visual instead. See Publish a new version from a tile.

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 from the library needs Manage DataPrism 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. A visual's Docs tab explains how to use it.
  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, importing .dpvisual bundles, and adding tiles to the library as drafts.
Manage DataPrism Organization VisualsManage DataPrism Organization VisualsPublishing visuals and versions, 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 Manage DataPrism 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. For a visual you use often, pin it and pick it from the Pinned row instead.

I switched a custom visual to a table. Is my code lost?

No. The tile keeps the visual aside while it is another type. Pick Custom visual in Visualizations again and the code, options, interactions and library link come back as they were.

Can I hide the Custom tag on a tile?

Yes. Select the tile, open General > Title and turn off Show visual tag. It hides the Custom or AI tag on that tile only, in edit mode, view mode and exports.

Will publishing a new version change existing reports?

Only if you publish with Replace in all dependant reports from the library, or with Update everywhere from a tile. With New version, dependants stay pinned or Only this tile, other 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 Manage DataPrism 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.