Package smile.plot.vega
Interface ViewComposition
- All Known Subinterfaces:
ViewLayoutComposition
public interface ViewComposition
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.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ViewComposition
resolveAxis
(String channel, String resolution) Sets an axis resolution.default ViewComposition
resolveLegend
(String channel, String resolution) Sets a legend resolution.default ViewComposition
resolveScale
(String channel, String resolution) Sets a scale resolution.com.fasterxml.jackson.databind.node.ObjectNode
spec()
Returns the top level Vega-Lite specification.
-
Method Details
-
spec
com.fasterxml.jackson.databind.node.ObjectNode spec()Returns the top level Vega-Lite specification. -
resolveScale
Sets a scale resolution. For scales, resolution can be specified for every channel.- Parameters:
channel
- positional or non-positional channel.resolution
- "shared" or "independent".- Returns:
- this object.
-
resolveAxis
Sets an axis resolution.- Parameters:
channel
- positional channel: "x" or "y".resolution
- "shared" or "independent".- Returns:
- this object.
-
resolveLegend
Sets a legend resolution.- Parameters:
channel
- non-positional channel: "color", "opacity", "shape", or "size".resolution
- "shared" or "independent".- Returns:
- this object.
-