This website is for Vega-Lite v3. Go to the main Vega-Lite homepage for the latest release.

Translating an Interval Selection

Edit this page

The translate selection transformation allows a user to interactively move an interval selection back-and-forth. It can take one of the following values:

  • false – disables the ability to pan an interval selection.
  • A Vega event stream definition to indicate which events should trigger panning of the interval selection. The event stream must be structured to include a start and end event to represent continuous panning interactions. Discrete panning (e.g., pressing the left/right arrow keys) will be supported in future versions.

Vega-Lite automatically adds a translate transform to all interval selections by default, with the following definition: "translate": "[mousedown, window:mouseup] > window:mousemove!". As a result, once users drag out an interval selection, they can click and drag within it to reposition it.

Examples

Pan the on .