Skip to contents

Add facet config (CompositionConfig) to a vega-lite spec.


vl_config_facet(spec, columns = NULL, spacing = NULL, .object = NULL)



An input vega-lite spec


The number of columns to include in the view composition layout.

Default value: undefined -- An infinite number of columns (a single row) will be assumed. This is equivalent to hconcat (for concat) and to using the column channel (for facet and repeat).


  1. This property is only for:

  • the general (wrappable) concat operator (not hconcat/vconcat)

  • the facet and repeat operator with one field/repetition definition (without row/column nesting)

  1. Setting the columns to 1 is equivalent to vconcat (for concat) and to using the row channel (for facet and repeat).


The default spacing in pixels between composed sub-views.

Default value: 20


Directly input an object, rather than creating one via the other arguments. Should not be used in conjunction with the other arguments other than spec. Objects can be of type: CompositionConfig


A modified Vega-Lite Spec