-
Notifications
You must be signed in to change notification settings - Fork 42
Facet
Lisa Zhang edited this page Nov 29, 2013
·
3 revisions
Wiki ▸ API Reference ▸ Chart Specification ▸ Facet
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.
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 stringwrap
. (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
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 stringgrid
. (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