Package com.storedobject.chart
Class Axis.Ticks
java.lang.Object
com.storedobject.chart.AbstractPart
com.storedobject.chart.VisiblePart
com.storedobject.chart.Axis.Line
com.storedobject.chart.Axis.AbstractTicks
com.storedobject.chart.Axis.Ticks
- All Implemented Interfaces:
ComponentPart,ComponentProperty,VisibleProperty
- Enclosing class:
Axis
Represents the tick on the axis line.
- Author:
- Syam
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEncode the JSON string with the properties of this.final intGet the interval between labels.final booleanCheck if ticks are aligned with labels or not.booleanisInside()Check if the tick is drawn inside or outside the axis.voidsetAlignWithLabel(boolean alignWithLabels) Set alignment of the ticks with labels.voidsetInside(boolean inside) Setting for drawing the tick inside the axis.voidsetInterval(int interval) Set the interval between labels.Methods inherited from class com.storedobject.chart.Axis.AbstractTicks
getWidth, setWidthMethods inherited from class com.storedobject.chart.VisiblePart
isVisible, setVisible, validateMethods inherited from class com.storedobject.chart.AbstractPart
equals, getId, getLabelTag, getName, getSerial, getZ, hashCode, 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
className, getRenderingIndex, setName, setRenderingIndexMethods inherited from interface com.storedobject.chart.VisibleProperty
hide, show
-
Constructor Details
-
Ticks
public Ticks()Constructor.
-
-
Method Details
-
encodeJSON
Description copied from interface:ComponentPropertyEncode the JSON string with the properties of this.- Specified by:
encodeJSONin interfaceComponentProperty- Overrides:
encodeJSONin classAxis.AbstractTicks- Parameters:
sb- Encoded JSON string to be appended to this.
-
isInside
public boolean isInside()Check if the tick is drawn inside or outside the axis.- Returns:
- True if inside.
-
setInside
public void setInside(boolean inside) Setting for drawing the tick inside the axis.- Parameters:
inside- True if inside.
-
getInterval
public final int getInterval()Get the interval between labels.- Returns:
- Interval.
-
setInterval
public void setInterval(int interval) Set the interval between labels. (If not set and if the "interval" is set for theAxis.Labelof the axis, that will be used).- Parameters:
interval- 0 means all labels, 1 means every alternate label, 2 means every 2nd label and so on. A special value of -1 means labeling will be determined automatically to remove overlap.
-
isAlignWithLabels
public final boolean isAlignWithLabels()Check if ticks are aligned with labels or not. (Applicable only to category type axes).- Returns:
- True or false.
-
setAlignWithLabel
public void setAlignWithLabel(boolean alignWithLabels) Set alignment of the ticks with labels. (Applicable only to category type axes).- Parameters:
alignWithLabels- True or false.
-