Package tech.tablesaw.plotly.components
Enum Axis.ScaleAnchor
- java.lang.Object
-
- java.lang.Enum<Axis.ScaleAnchor>
-
- tech.tablesaw.plotly.components.Axis.ScaleAnchor
-
- All Implemented Interfaces:
Serializable
,Comparable<Axis.ScaleAnchor>
- Enclosing class:
- Axis
public static enum Axis.ScaleAnchor extends Enum<Axis.ScaleAnchor>
If set to another axis id (e.g. `x2`, `y`), the range of this axis changes together with the range of the corresponding axis such that the scale of pixels per unit is in a constant ratio. Both axes are still zoomable, but when you zoom one, the other will zoom the same amount, keeping a fixed midpoint. `constrain` and `constraintoward` determine how we enforce the constraint. You can chain these, ie `yaxis: {scaleanchor: "x"}, xaxis2: {scaleanchor: "y"}` but you can only link axes of the same `type`. The linked axis can have the opposite letter (to constrain the aspect ratio) or the same letter (to match scales across subplots). Loops (`yaxis: {scaleanchor: "x"}, xaxis: {scaleanchor: "y"}` or longer) are redundant and the last constraint encountered will be ignored to avoid possible inconsistent constraints via `scaleratio`.TODO: Just make this a string?
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
static Axis.ScaleAnchor
valueOf(String name)
Returns the enum constant of this type with the specified name.static Axis.ScaleAnchor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
X
public static final Axis.ScaleAnchor X
-
Y
public static final Axis.ScaleAnchor Y
-
-
Method Detail
-
values
public static Axis.ScaleAnchor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Axis.ScaleAnchor c : Axis.ScaleAnchor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Axis.ScaleAnchor valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
public String toString()
- Overrides:
toString
in classEnum<Axis.ScaleAnchor>
-
-