Package com.storedobject.chart
Class XYAxis
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.VisiblePart
com.storedobject.chart.Axis
com.storedobject.chart.XYAxis
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.chart.Axis
Axis.AbstractTicks, Axis.GridAreas, Axis.GridLines, Axis.Label, Axis.Line, Axis.MinorGridLines, Axis.MinorTicks, Axis.Pointer, Axis.PointerHandle, Axis.PointerLabel, Axis.PointerType, Axis.Ticks -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEncode the JSON string with the properties of this.intGet the offset of the axis.final booleanIs this axis inverted.final booleanIs this displayed on the opposite side (For example, an X axis is normally displayed at the bottom, but we can also display it at the top).voidsetInverse(boolean inverse) Invert the axis so that it will run from the opposite end.voidsetOffset(int offset) Set an offset value so that the axis will be displayed at an offset from the normal position.voidsetOpposite(boolean opposite) Set the attribute to make it displayed on the opposite side.Methods inherited from class com.storedobject.chart.Axis
equals, getDataType, getGridAreas, getGridLines, getLabel, getMinorGridLines, getMinorTicks, getName, getNameGap, getNameLocation, getNameRotation, getNameTextStyle, getPointer, getRenderingIndex, getTicks, hashCode, invert, isAllowEvents, setAllowEvents, setData, setDivisions, setGridAreas, setGridLines, setLabel, setMax, setMaxAsMaxData, setMin, setMinAsMinData, setMinorGridLines, setMinorTicks, setName, setNameGap, setNameLocation, setNameRotation, setNameTextStyle, setPointer, setRenderingIndex, setTicks, showZeroPosition, validateMethods inherited from class com.storedobject.chart.VisiblePart
isVisible, setVisibleMethods inherited from class com.storedobject.chart.AbstractPart
getId, getLabelTag, getSerial, getZ, hasId, setSerial, setZMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.chart.ComponentPart
classNameMethods inherited from interface com.storedobject.chart.VisibleProperty
hide, show
-
Constructor Details
-
XYAxis
-
XYAxis
Constructor.- Parameters:
data- Data type will be determined from the data provider. Note: It is not required to use the same data on this axis.
-
-
Method Details
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Overrides:
encodeJSONin classAxis- Parameters:
sb- Encoded JSON string to be appended to this.
-
isOpposite
public final boolean isOpposite()Is this displayed on the opposite side (For example, an X axis is normally displayed at the bottom, but we can also display it at the top).- Returns:
- True or false.
-
setOpposite
public void setOpposite(boolean opposite) Set the attribute to make it displayed on the opposite side.- Parameters:
opposite- True or false.
-
getOffset
public int getOffset()Get the offset of the axis. Normally, the offset is zero and if non-zero, the display will be shifted from the normal position by that many pixels. This is useful if more than one axis are displayed together.- Returns:
- Offset value.
-
setOffset
public void setOffset(int offset) Set an offset value so that the axis will be displayed at an offset from the normal position.- Parameters:
offset- Offset value in pixels.
-
setInverse
public void setInverse(boolean inverse) Invert the axis so that it will run from the opposite end.- Parameters:
inverse- True/false.
-
isInverse
public final boolean isInverse()Is this axis inverted.- Returns:
- True/false.
-