Interface ViewComposition

All Known Subinterfaces:
ViewLayoutComposition
All Known Implementing Classes:
Concat, Facet, Layer, Repeat

public interface ViewComposition
All view composition specifications (layer, facet, concat, and repeat) can have the resolve property for scale, axes, and legend resolution.

Vega-Lite determines whether scale domains should be unioned. If the scale domain is unioned, axes and legends can be merged. Otherwise, they have to be independent.

There are two options to resolve a scale, axis, or legend: "shared" and "independent". Independent scales imply independent axes and legends.

  • Method Details

    • spec

      com.fasterxml.jackson.databind.node.ObjectNode spec()
      Returns the top level Vega-Lite specification.
    • resolveScale

      default ViewComposition resolveScale(String channel, String resolution)
      Sets a scale resolution. For scales, resolution can be specified for every channel.
      Parameters:
      channel - positional or non-positional channel.
      resolution - "shared" or "independent".
      Returns:
      this object.
    • resolveAxis

      default ViewComposition resolveAxis(String channel, String resolution)
      Sets an axis resolution.
      Parameters:
      channel - positional channel: "x" or "y".
      resolution - "shared" or "independent".
      Returns:
      this object.
    • resolveLegend

      default ViewComposition resolveLegend(String channel, String resolution)
      Sets a legend resolution.
      Parameters:
      channel - non-positional channel: "color", "opacity", "shape", or "size".
      resolution - "shared" or "independent".
      Returns:
      this object.