Facet

smile.plot.vega.Facet
See theFacet companion trait
object Facet

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Facet.type

Members list

Value members

Concrete methods

def field(field: String, `type`: String, bin: JsValue, timeUnit: String, align: String, center: Boolean, spacing: Int, header: JsValue, sort: JsValue): JsObject

Returns a facet field Definition.

Returns a facet field Definition.

Value parameters

`type`

The encoded field's type of measurement ("quantitative", "temporal", "ordinal", or "nominal"). It can also be a "geojson" type for encoding 'geoshape'. Data type describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. Data values for a temporal field can be either a date-time string (e.g., "2015-03-07 12:32:17", "17:01", "2015-03-16", "2015") or a timestamp number (e.g., 1552199579097).

align

The alignment to apply to row/column facet's subplot. The supported string values are "all", "each", and "none". - For "none", a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For "each", subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For "all", subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.

bin

A flag for binning a quantitative field. - If true, default binning parameters will be applied. - If "binned", this indicates that the data for the x (or y) channel are already binned.

center

Boolean flag indicating if facet's subviews should be centered relative to their respective rows or columns.

field

A string defining the name of the field from which to pull a data value or an object defining iterated values from the repeat operator.

header

An object defining properties of a facet's header.

sort

Sort order for the encoded field. For continuous fields (quantitative or temporal), sort can be either "ascending" or "descending". For discrete fields, sort can be one of the following: - "ascending" or "descending" - for sorting by the values' natural order in JavaScript. - A string indicating an encoding channel name to sort by (e.g., "x" or "y") with an optional minus prefix for descending sort (e.g., "-x" to sort by x-field, descending). This channel string is short-form of a sort-by-encoding definition. For example, "sort": "-x" is equivalent to "sort": {"encoding": "x", "order": "descending"}.

spacing

The spacing in pixels between facet's sub-views.

timeUnit

Time unit (e.g., year, yearmonth, month, hours) for a temporal field, or a temporal field that gets casted as ordinal.

Attributes