Skip to content

Presets

Presets are named collections of customizations that configure which tokens appear in descriptions at each verbosity level. The vis domain ships three presets: detailed, standard, and minimal.

The three vis presets

Detailed

All available tokens at long brevity. Maximum information density.

Standard

A balanced set of tokens at short brevity. This is the default preset applied by the vis domain.

Minimal

A reduced set of tokens at short brevity. Fastest to scan.

Role/token matrix

The table below shows which tokens are included in each preset for each role. D = detailed, S = standard, M = minimal.

RolenamevisTypevisDatavisSizeparentchildrenaggregatequartileinstructions
rootD S MD S MDD SD S M
viewD S MD SD
xAxisD S MDD S MD SD S
yAxisD S MDD S MD SD S
legendD S MDD S MD SD S
guideD S MDD SD
filteredDataD S MD SDD SDD S
annotationsD S MD S
otherD MD SD S

Brevity

  • Detailed uses long brevity — each token's long text is used.
  • Standard and Minimal use short brevity — each token's short text is used.

How presets are registered

The vis domain calls registerPreset for each preset during domain registration:

ts
runtime.customization.registerPreset('detailed', detailedCustomizations);
runtime.customization.registerPreset('standard', standardCustomizations);
runtime.customization.registerPreset('minimal', minimalCustomizations);

The vis domain also sets defaultPreset: 'standard', so the standard preset is applied automatically.

Applying presets programmatically

Use the OlliHandle or the runtime:

ts
// Via OlliHandle
handle.applyPreset('detailed');

// Via runtime
runtime.customization.applyPreset('minimal');

Custom presets

You can register your own presets:

ts
runtime.customization.registerPreset('my-preset', [
  {
    role: 'root',
    recipe: [
      { token: 'name', brevity: 'short' },
      { token: 'visType', brevity: 'short' },
    ],
  },
  {
    role: 'filteredData',
    recipe: [
      { token: 'visData', brevity: 'long' },
      { token: 'aggregate', brevity: 'long' },
    ],
  },
]);

runtime.customization.applyPreset('my-preset');

Roles not covered by the preset retain their current customization.

Next

Released under the BSD-3-Clause License.