Skip to content
Lisa Zhang edited this page Nov 29, 2013 · 3 revisions

WikiAPI ReferenceChart SpecificationFacet

Facets display subsets of the dataset in different panels. It therefore produces multiple, smaller charts, one for each value of some data column(s).

Facets can be set using the spec.facet attribute. This attribute should be a JSON object facet specifying one of the below methods of faceting.

Wrapping facet

Splits the data by one data column, which may have a large number of unique values. Charts do not all appear on a single row, instead can wrap in a user specified manner.

  • facet.type - This should be set to the string wrap. (required)
  • facet.var - The name of the data column to split the charts on. (required)
  • facet.cols - An integer number of columns of panes.
  • facet.rows - An integer number of rows of panes.
  • facet.formatter - DESCRIBE

Grid facet

Splits data by up to two data columns, one specifying the row values and another the column values. One of x or y is required.

  • facet.type - This should be set to the string grid. (required)
  • facet.x - The data column determining the way data is split horizontally.
  • facet.y - The data column determining the way data is split vertically.
  • facet.formatter - DESCRIBE
Clone this wiki locally