Class Layer
java.lang.Object
smile.plot.vega.VegaLite
smile.plot.vega.View
smile.plot.vega.Layer
- All Implemented Interfaces:
ViewComposition
To superimpose one chart on top of another.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencodeDatum(String channel, double datum) Sets a constant data value encoded via a scale.encodeDatum(String channel, int datum) Sets a constant data value encoded via a scale.encodeDatum(String channel, String datum) Sets a constant data value encoded via a scale.encodeValue(String channel, double value) Sets an encoded constant visual value.encodeValue(String channel, int value) Sets an encoded constant visual value.encodeValue(String channel, String value) Sets an encoded constant visual value.height(int height) Sets the height of a plot with a continuous y-field, or the fixed height of a plot a discrete y-field or no y-field.To enable responsive sizing on height.heightStep(int step) For a discrete y-field, sets the height per discrete step.resolveAxis(String channel, String resolution) Sets an axis resolution.resolveLegend(String channel, String resolution) Sets a legend resolution.resolveScale(String channel, String resolution) Sets a scale resolution.width(int width) Sets the width of a plot with a continuous x-field, or the fixed width of a plot a discrete x-field or no x-field.To enable responsive sizing on width.widthStep(int step) For a discrete x-field, sets the width per discrete step.Methods inherited from class View
autosize, autosize, background, background, description, encode, mark, name, padding, padding, projection, title, usermeta, usermetaMethods inherited from class VegaLite
config, data, html, html, iframe, iframe, show, show, spec, toPrettyString, toString, transform, viewConfigMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ViewComposition
spec
-
Constructor Details
-
Layer
Constructor.Note: Specifications inside layer cannot use row and column channels as layering facet specifications is not allowed. Instead, use the facet operator and place a layer inside a facet.
- Parameters:
views- Layer or single view specifications to be superimposed.
-
-
Method Details
-
width
-
height
-
width
-
height
-
widthStep
-
heightStep
Description copied from class:ViewFor a discrete y-field, sets the height per discrete step.- Overrides:
heightStepin classView- Parameters:
step- the height per discrete step.- Returns:
- this object.
-
encodeValue
Description copied from class:ViewSets an encoded constant visual value.- Overrides:
encodeValuein classView- Parameters:
channel- the encoding channel.value- the constant visual value.- Returns:
- this object.
-
encodeValue
Description copied from class:ViewSets an encoded constant visual value.- Overrides:
encodeValuein classView- Parameters:
channel- the encoding channel.value- the constant visual value.- Returns:
- this object.
-
encodeValue
-
encodeDatum
Description copied from class:ViewSets a constant data value encoded via a scale.- Overrides:
encodeDatumin classView- Parameters:
channel- the encoding channel.datum- the constant data value.- Returns:
- this object.
-
encodeDatum
Description copied from class:ViewSets a constant data value encoded via a scale.- Overrides:
encodeDatumin classView- Parameters:
channel- the encoding channel.datum- the constant data value.- Returns:
- this object.
-
encodeDatum
-
resolveScale
Description copied from interface:ViewCompositionSets a scale resolution. For scales, resolution can be specified for every channel.- Specified by:
resolveScalein interfaceViewComposition- Parameters:
channel- positional or non-positional channel.resolution- "shared" or "independent".- Returns:
- this object.
-
resolveAxis
Description copied from interface:ViewCompositionSets an axis resolution.- Specified by:
resolveAxisin interfaceViewComposition- Parameters:
channel- positional channel: "x" or "y".resolution- "shared" or "independent".- Returns:
- this object.
-
resolveLegend
Description copied from interface:ViewCompositionSets a legend resolution.- Specified by:
resolveLegendin interfaceViewComposition- Parameters:
channel- non-positional channel: "color", "opacity", "shape", or "size".resolution- "shared" or "independent".- Returns:
- this object.
-