Class StackTransform

java.lang.Object
smile.plot.vega.StackTransform

public class StackTransform extends Object
The stack transform.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toPrettyString

      public String toPrettyString()
      Returns the specification in pretty print.
      Returns:
      the specification in pretty print.
    • offset

      public StackTransform offset(String mode)
      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

      public StackTransform sort(String... fields)
      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

      public StackTransform sort(SortField... fields)
      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.