Package smile.plot.vega
Class StackTransform
java.lang.Object
smile.plot.vega.StackTransform
The stack transform.
-
Method Summary
Modifier and TypeMethodDescriptionSets the mode for stacking marks.Sets the fields for sorting data objects within a window.Sets the fields for sorting data objects within a window.Returns the specification in pretty print.toString()
-
Method Details
-
toString
-
toPrettyString
Returns the specification in pretty print.- Returns:
- the specification in pretty print.
-
offset
Sets the mode for stacking marks. The "zero" offset will stack starting at 0. The "center" offset will center the stacks. The "normalize" offset will compute percentage values for each stack point, with output values in the range [0,1].- Parameters:
mode
- "zero", "center", or "normalize".- Returns:
- this object.
-
sort
Sets the fields for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered "peer" values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the ignorePeers parameter is ignored and treated as if set to true).- Parameters:
fields
- the partitioning fields.- Returns:
- this object.
-
sort
Sets the fields for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered "peer" values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the ignorePeers parameter is ignored and treated as if set to true).- Parameters:
fields
- the partitioning fields.- Returns:
- this object.
-