ViewComposition

smile.plot.vega.ViewComposition
trait ViewComposition extends VegaLite

All view composition specifications (layer, facet, concat, and repeat) can have the resolve property for scale, axes, and legend resolution.

Vega-Lite determines whether scale domains should be unioned. If the scale domain is unioned, axes and legends can be merged. Otherwise, they have to be independent.

There are two options to resolve a scale, axis, or legend: "shared" and "independent". Independent scales imply independent axes and legends.

Attributes

Graph
Supertypes
trait VegaLite
trait LazyLogging
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

def resolveAxis(axis: JsObject): this.type

Axis resolutions. For axes, resolutions can be defined for x and y (positional channels).

Axis resolutions. For axes, resolutions can be defined for x and y (positional channels).

Attributes

def resolveLegend(legend: JsObject): this.type

Legend resolutions. For legends, resolutions can be defined for color, opacity, shape, and size (non-positional channels).

Legend resolutions. For legends, resolutions can be defined for color, opacity, shape, and size (non-positional channels).

Attributes

def resolveScale(scale: JsObject): this.type

Scale resolutions. For scales, resolution can be specified for every channel.

Scale resolutions. For scales, resolution can be specified for every channel.

Attributes

Inherited methods

def autosize(`type`: String, resize: Boolean, contains: String): VegaLite.this.type

Sets the overall size of the visualization. The total size of a Vega-Lite visualization may be determined by multiple factors: specified width, height, and padding values, as well as content such as axes, legends, and titles.

Sets the overall size of the visualization. The total size of a Vega-Lite visualization may be determined by multiple factors: specified width, height, and padding values, as well as content such as axes, legends, and titles.

Value parameters

`type`

The sizing format type. One of "pad", "fit", "fit-x", "fit-y", or "none". See the autosize type documentation for descriptions of each.

contains

Determines how size calculation should be performed, one of "content" or "padding". The default setting ("content") interprets the width and height settings as the data rectangle (plotting) dimensions, to which padding is then added. In contrast, the "padding" setting includes the padding within the view size calculations, such that the width and height settings indicate the total intended size of the view.

resize

A boolean flag indicating if autosize layout should be re-calculated on every view update.

Attributes

Inherited from:
VegaLite
def background(color: String): VegaLite.this.type

CSS color property to use as the background of the entire view.

CSS color property to use as the background of the entire view.

Attributes

Inherited from:
VegaLite
def config(properties: JsObject): VegaLite.this.type

Sets Vega-Lite configuration object that lists configuration properties of a visualization for creating a consistent theme. This property can only be defined at the top-level of a specification.

Sets Vega-Lite configuration object that lists configuration properties of a visualization for creating a consistent theme. This property can only be defined at the top-level of a specification.

Attributes

Inherited from:
VegaLite
def data(url: String, format: JsValue): VegaLite.this.type

Sets the url of the data source.

Sets the url of the data source.

Value parameters

format

Type of input data: "json", "csv", "tsv", "dsv". Default value: The default format type is determined by the extension of the file URL. If no extension is detected, "json" will be used by default.

url

A URL from which to load the data set.

Attributes

Inherited from:
VegaLite
def data(df: DataFrame): VegaLite.this.type

Sets a data frame describing the data source.

Sets a data frame describing the data source.

Attributes

Inherited from:
VegaLite
def data(rows: JsObject*): VegaLite.this.type

Sets an array of objects describing the data source.

Sets an array of objects describing the data source.

Attributes

Inherited from:
VegaLite
def data(json: JsArray): VegaLite.this.type

Sets a JSON array describing the data source. Set to null to ignore the parent's data source. If no data is set, it is derived from the parent.

Sets a JSON array describing the data source. Set to null to ignore the parent's data source. If no data is set, it is derived from the parent.

Attributes

Inherited from:
VegaLite
def description(description: String): VegaLite.this.type

Sets the description of this mark for commenting purpose.

Sets the description of this mark for commenting purpose.

Attributes

Inherited from:
VegaLite
def html: String

Returns the HTML of plot specification with Vega Embed.

Returns the HTML of plot specification with Vega Embed.

Attributes

Inherited from:
VegaLite
def iframe(id: String): String

Returns the HTML wrapped in an iframe to render in notebooks.

Returns the HTML wrapped in an iframe to render in notebooks.

Value parameters

id

the iframe HTML id.

Attributes

Inherited from:
VegaLite
def name(name: String): VegaLite.this.type

Sets the name of the visualization for later reference.

Sets the name of the visualization for later reference.

Attributes

Inherited from:
VegaLite
def padding(left: Int, top: Int, right: Int, bottom: Int): VegaLite.this.type

Specifies padding for each side. The visualization padding, in pixels, is from the edge of the visualization canvas to the data rectangle.

Specifies padding for each side. The visualization padding, in pixels, is from the edge of the visualization canvas to the data rectangle.

Attributes

Inherited from:
VegaLite
def padding(size: Int): VegaLite.this.type

Specifies padding for all sides. The visualization padding, in pixels, is from the edge of the visualization canvas to the data rectangle.

Specifies padding for all sides. The visualization padding, in pixels, is from the edge of the visualization canvas to the data rectangle.

Attributes

Inherited from:
VegaLite
def show(silent: Boolean): Unit

Displays the plot with the default browser.

Displays the plot with the default browser.

Value parameters

silent

If true, silently swallow any exception.

Attributes

Inherited from:
VegaLite
def title(title: String): VegaLite.this.type

Sets a descriptive title to a chart.

Sets a descriptive title to a chart.

Attributes

Inherited from:
VegaLite
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
VegaLite -> Any
Inherited from:
VegaLite
def transform(transforms: JsObject*): VegaLite.this.type

An array of data transformations such as filter and new field calculation. Data transformations in Vega-Lite are described via either view-level transforms (the transform property) or field transforms inside encoding (bin, timeUnit, aggregate, sort, and stack).

An array of data transformations such as filter and new field calculation. Data transformations in Vega-Lite are described via either view-level transforms (the transform property) or field transforms inside encoding (bin, timeUnit, aggregate, sort, and stack).

When both types of transforms are specified, the view-level transforms are executed first based on the order in the array. Then the inline transforms are executed in this order: bin, timeUnit, aggregate, sort, and stack.

Attributes

Inherited from:
VegaLite
def transform(transforms: JsArray): VegaLite.this.type

An array of data transformations such as filter and new field calculation. Data transformations in Vega-Lite are described via either view-level transforms (the transform property) or field transforms inside encoding (bin, timeUnit, aggregate, sort, and stack).

An array of data transformations such as filter and new field calculation. Data transformations in Vega-Lite are described via either view-level transforms (the transform property) or field transforms inside encoding (bin, timeUnit, aggregate, sort, and stack).

When both types of transforms are specified, the view-level transforms are executed first based on the order in the array. Then the inline transforms are executed in this order: bin, timeUnit, aggregate, sort, and stack.

Attributes

Inherited from:
VegaLite
def usermeta(data: JsValue): VegaLite.this.type

Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.

Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata.

Attributes

Inherited from:
VegaLite

Inherited fields

lazy protected val logger: Logger

Attributes

Inherited from:
LazyLogging
val spec: JsObject

The specification

The specification

Attributes

Inherited from:
VegaLite