Layer

class Layer extends Grammar[Layer]

Layer for view compositions such as "layer", "concat, "hconcat" and "vconcat".

Value Params
cfg

Plotting configuration.

Since

0.1.0

Companion
object
class Grammar[Layer]
trait Dynamic
class Object
trait Matchable
class Any

Value members

Inherited methods

def align(struct: Struct*): Layer

The alignment to apply to grid rows and columns.

The alignment to apply to grid rows and columns.

Value Params
struct

https://vega.github.io/vega-lite/docs/spec.html#common

Since

0.1.0

Inherited from
Grammar
def applyDynamicNamed(method: String)(kwargs: (String, Struct)*): Layer
Inherited from
Grammar
def arc: Layer
def bar: Layer
def bounds(struct: Struct*): Layer

The bounds calculation method to use for determining the extent of a sub-plot.

The bounds calculation method to use for determining the extent of a sub-plot.

Value Params
struct

https://vega.github.io/vega-lite/docs/spec.html#common

Since

0.1.0

Inherited from
Grammar
def center(struct: Struct*): Layer

Indicating if subviews should be centered relative to their respective rows or columns.

Indicating if subviews should be centered relative to their respective rows or columns.

Value Params
struct

https://vega.github.io/vega-lite/docs/spec.html#common

Since

0.1.0

Inherited from
Grammar
def color(field: String, as: String, aggregate: Struct, bin: Struct, condition: Struct, datum: Struct, legend: Struct, scale: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer
def concat(columns: Int, layers: Layer*): Layer

Concatenation of plots.

Value Params
layers

Layers.

See also
Since

0.1.0

Inherited from
Grammar
def custom(name: String, struct: Struct): Layer

Custom element.

Custom element.

Value Params
name

Element name.

struct

Definition.

Since

0.1.0

Inherited from
Grammar
def customEncoding(name: String, field: String, struct: Struct): Layer

Custom encoding channel element.

Custom encoding channel element.

Value Params
field

Column or field name.

name

Encoding name.

struct

Definition.

Since

0.1.0

Inherited from
Grammar
def data: Layer

Custom data definition.

Since

0.1.0

Inherited from
Grammar

DataFrame referenced by column names for Plot or Layer.

DataFrame referenced by column names for Plot or Layer.

Value Params
df

DataFrame.

Since

0.1.0

Inherited from
Grammar
def dataInclude(field: String*): Layer

Embeds additional DataFrame columns in the data.

Embeds additional DataFrame columns in the data.

Value Params
field

Column name.

Since

0.1.0

Inherited from
Grammar
def description(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, condition: Struct, datum: Struct, format: Struct, formatType: String, timeUnit: Struct, title: Struct, value: Struct): Layer
def description(string: String): Layer

Description of this mark for commenting purpose.

Description of this mark for commenting purpose.

https://vega.github.io/vega-lite/docs/spec.html#common

Value Params
string

Description.

Since

0.1.0

Inherited from
Grammar
def detail(field: String, as: String): Layer

Defines an additional grouping field for grouping data without mapping the field to any visual properties.

Defines an additional grouping field for grouping data without mapping the field to any visual properties.

https://vega.github.io/vega-lite/docs/encoding.html#detail

Value Params
as

https://vega.github.io/vega-lite/docs/type.html

field

Column or field name.

Since

0.1.0

Inherited from
Grammar
def details(fields: (String, String)*): Layer

Defines additional grouping fields for grouping data without mapping the fields to any visual properties.

Defines additional grouping fields for grouping data without mapping the fields to any visual properties.

https://vega.github.io/vega-lite/docs/encoding.html#detail

Value Params
fields

Tuples of field and as (https://vega.github.io/vega-lite/docs/type.html). Example:

.details( "group3" -> Nominal, "group4" -> Nominal)
Since

0.1.0

Inherited from
Grammar
def hconcat(layers: Layer*): Layer

Horizontal concatenation of plots.

Horizontal concatenation of plots.

https://vega.github.io/vega-lite/docs/concat.html

Value Params
layers

Layers.

Since

0.1.0

Inherited from
Grammar
def height(px: Int): Layer

Height of plot.

Value Params
px

Height of plot.

Since

0.1.0

Inherited from
Grammar
def href(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, condition: Struct, datum: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer
def key(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, format: Struct, formatType: String, timeUnit: Struct, title: Struct, value: Struct): Layer
def latitude(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer
def latitude2(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer

Latitude2 position for geographically projected ranged "area", "bar", "rect", and "rule"

def layer(layers: Layer*): Layer

Adds multiple (overlaying) layers .

Adds multiple (overlaying) layers .

https://vega.github.io/vega-lite/docs/layer.html

Value Params
layers

Layers.

Since

0.1.0

Note

The layering mode is applied to all defined layers.

Inherited from
Grammar
def longitude(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer
def longitude2(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer

Longitude2 position for geographically projected ranged "area", "bar", "rect", and "rule".

def name(name: String): Layer

Name of the visualization for reference.

Name of the visualization for reference.

https://vega.github.io/vega-lite/docs/spec.html#common

Value Params
name

Name.

Since

0.1.0

Inherited from
Grammar
def order(fields: (String, Struct)*): Layer

Multi-field order definition.

Value Params
fields

Tuples of field names and Struct.

Since

0.1.0

Inherited from
Grammar
def order(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, condition: Struct, datum: Struct, sort: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer

The order defines a data field that is used to sorts stacking order for stacked charts and the order of data points in line marks for connected scatterplots.

def param(struct: Struct*): Layer

Parameters can either be simple variables or more complex selections that map user input to data queries.

Parameters can either be simple variables or more complex selections that map user input to data queries.

Value Params
struct

https://vega.github.io/vega-lite/docs/parameter.html

Since

0.1.0

Inherited from
Grammar

Sets cartographic projection.

Since

0.1.0

Inherited from
Grammar
def radius(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, scale: Struct, sort: Struct, stack: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer
def radius2(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer

Radius2 determines the position or interval on polar coordinates for arc and text marks.

def resolve(scale: Struct, axis: Struct, legend: Struct): Layer

Scale, axis, and legend resolutions for view composition specifications.

def spacing(struct: Struct*): Layer

The spacing (in pixels) between sub-views of the composition operator.

The spacing (in pixels) between sub-views of the composition operator.

Value Params
struct

https://vega.github.io/vega-lite/docs/spec.html#common

Since

0.1.0

Inherited from
Grammar
def theta(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, scale: Struct, sort: Struct, stack: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer
def theta2(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer

Theta2 determines the interval on polar coordinates for arc and text marks.

def title(title: Struct): Layer
def tooltips(fields: (String, Struct)*): Layer

Multi-field tooltip text to show upon mouse hover.

Multi-field tooltip text to show upon mouse hover.

https://vega.github.io/vega-lite/docs/tooltip.html

Value Params
fields

Tuples of field names and Struct(field, as, aggregate, bandPosition, bin, condition, datum, format, formatType, timeUnit, title, value) (see tooltip for details).

Since

0.1.0

Example
.tooltips(
 "x" -> Struct(field = "x", as = Temporal, title = "X Value"),
 "y" -> Struct(field = "y", as = Nominal, title = "Y Value")
)
Inherited from
Grammar
def transform(struct: Struct*): Layer

Data transformations such as filter and new field calculation.

Data transformations such as filter and new field calculation.

Value Params
struct

https://vega.github.io/vega-lite/docs/transform.html

Since

0.1.0

Note

Use "set" to set a new field/variable.

Example
.transform(
 Struct(calculate="datum.x*datum.x", set="x2"),
 Struct(filter="datum.x2 < 100")
 )
Inherited from
Grammar
def vconcat(layers: Layer*): Layer

Vertical concatenation of plots.

Vertical concatenation of plots.

https://vega.github.io/vega-lite/docs/concat.html

Value Params
layers

Layers.

Since

0.1.0

Inherited from
Grammar
def view: Layer

Defines the view background’s fill and stroke.

Defines the view background’s fill and stroke.

https://vega.github.io/vega-lite/docs/spec.html#view-background

Since

0.1.0

Inherited from
Grammar
def width(px: Int): Layer

Width of plot.

Value Params
px

Width of plot.

Since

0.1.0

Inherited from
Grammar
def x2(field: String, as: String, aggregate: Struct, bin: Struct, bandPosition: Struct, datum: Struct, impute: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer
def xOffset(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, scale: Struct, sort: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer
def y2(field: String, as: String, aggregate: Struct, bin: Struct, bandPosition: Struct, datum: Struct, impute: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer
def yOffset(field: String, as: String, aggregate: Struct, bandPosition: Struct, bin: Struct, datum: Struct, scale: Struct, sort: Struct, timeUnit: Struct, title: Struct, value: Struct): Layer