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.
Rows, under General > Limits, sets how many rows the tile asks for.
hasMore).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.
The control depends on what the option holds:
| What the option holds | The control | How you set it |
|---|---|---|
| On or off | A switch | Toggle it. |
| A colour | A token picker, reading Pick a token | Pick a theme token; the swatch is labelled Colour token. |
| One of several values | A list, reading Choose | Pick a value. |
| A number | A number box | Type a value; the box honours the option's minimum and maximum. |
| A list of values | A text field, reading comma separated | Type the values, separated by commas. |
| Text | A text field | Type the value. |
options. json are checked against the visual's schema. A problem is refused with a message such as options.json must be a JSON object, options.json: "title" is required or options.json: "count" must be a number. A definition that cannot be read is refused with the visual definition could not be parsed.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.
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..
| What | Cap |
|---|---|
visual. | 96 KB |
visual. | 64 KB |
visual. | 128 KB |
| All source files together | 256 KB |
| Options schema | 32 KB |
| Viewer state, saved or declared | 16 KB |
| The whole saved definition | 512 KB |
auto, native, snapshot or table), a pages setting (current, all or first) and a scale (1, 1. 5 or 2). A new visual starts from auto, current and 2.uni. state. set: state would be N bytes, above the 16384-byte cap; keep only what the visual needs to restore itself.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.
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).
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.
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.
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.
Yes. Option values belong to the tile in the report you have open, and other people see them once the report is saved.
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.
The definition has caps: visual. 96 KB, visual. 64 KB, visual. 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.. Trim the file below its cap and apply again.
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.
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.