Custom visual options, data and limits

A custom visual draws the fields you place on its tile and the values you set in its panel. This page covers what the visual receives, how its options work, and the caps on rows, code and assets. For writing the code itself, see The custom visual Studio.

What the visual receives

How many rows the visual loads

Rows, under General > Limits, sets how many rows the tile asks for.

Change a visual's options

Options are the settings a visual's author declares, such as a label, a colour or a number. They show beside the tile, and each tile keeps its own values.

  1. Open the report in edit mode and select the custom visual tile.
  2. In the Visualizations panel, open the Visual tab.
  3. Change the values under Visual options. The change goes into the report, so save the report to keep it.

The control depends on what the option holds:

What the option holdsThe controlHow you set it
On or offA switchToggle it.
A colourA token picker, reading Pick a tokenPick a theme token; the swatch is labelled Colour token.
One of several valuesA list, reading ChoosePick a value.
A numberA number boxType a value; the box honours the option's minimum and maximum.
A list of valuesA text field, reading comma separatedType the values, separated by commas.
TextA text fieldType the value.

Assets and their budget

Asset files belong to the report, and a visual references them. To upload and manage files, open the Studio's assets/ row; the dialog is described on Custom visual Studio, assets and diagnostics.

Size caps

The definition is checked against these caps when you apply. Crossing a cap refuses the apply, and the message names the part and the cap, in the form visual.css is N bytes; the cap is 65536.

WhatCap
visual.html96 KB
visual.css64 KB
visual.js128 KB
All source files together256 KB
Options schema32 KB
Viewer state, saved or declared16 KB
The whole saved definition512 KB

Export

What the tile keeps

Questions, answered

How many rows can a custom visual load?

Up to 100,000. Set it under General > Limits, on the Rows row; it starts at 1,000 and the help line reads "Default 1,000 · max 100,000". The value applies when you leave the field or press Enter, and the tile runs again with it.

Why does the visual receive fewer rows than the query returns?

The tile asks for the number of rows set under General > Limits, so a bigger result is cut to that number. A single message also carries about 32 MB of row data, so a very large result arrives as the longest prefix that fits. In both cases the data the visual receives says that more rows exist (hasMore).

Can a custom visual see columns that are not on the tile?

No. Every row carries only the fields placed on the tile's Data well; a column you do not place there is not sent to the visual.

Where do I change a visual's options?

In edit mode, select the tile, open the Visual tab of the Visualizations panel, and change the values under Visual options. The values belong to this tile; save the report to keep them.

Why is one of the visual's options missing?

An option can depend on another: it stays hidden until the option it depends on holds the value its author named. Change that option and the hidden one appears.

Do option changes save with the report?

Yes. Option values belong to the tile in the report you have open, and other people see them once the report is saved.

How large can an uploaded asset be?

Up to 20 MB per file, and up to 20 files per drop. A visual may transfer up to 8 MB of assets, and the dialog warns when the report's files would pass that budget. See Custom visual Studio, assets and diagnostics.

Why does Apply refuse my code as too large?

The definition has caps: visual.html 96 KB, visual.css 64 KB, visual.js 128 KB, all source files together 256 KB, the options schema 32 KB and the whole saved definition 512 KB. The message names the part and the cap, in the form visual.css is N bytes; the cap is 65536. Trim the file below its cap and apply again.

What happens to custom visuals when the report is exported?

Every custom visual is pictured with its page. A visual that cannot be pictured is reported in a warning that names the tile and the short reason, such as Custom visual "Gauge" could not be pictured: did not answer in time, and the rest of the export continues.

Does a custom visual remember what a viewer changed?

For five days. State the visual saves for its viewer stays with the tile and is handed back on the next visit; after five days it is cleared, and the visual starts from its own default.