Package com.inet.report.chart.axis
Class GroupAxis
- java.lang.Object
-
- com.inet.report.chart.axis.BaseAxis
-
- com.inet.report.chart.axis.GroupAxis
-
- All Implemented Interfaces:
java.io.Serializable
public class GroupAxis extends BaseAxis
The axis which displays the category and series group values.- Since:
- 8.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Integer
DEFAULT_MAXIMUM_LINES
The default value for maximum lines of label.static java.lang.Double
DEFAULT_ROTATION_ANGLE
The default value for rotation angle (in radians).static java.lang.Float
DEFAULT_WIDTH_RATIO
The default value for width ratio.-
Fields inherited from class com.inet.report.chart.axis.BaseAxis
DEFAULT_AXIS_LINE_COLOR, DEFAULT_GRIDLINE_COLOR, DEFAULT_TICK_LABEL_COLOR, DEFAULT_TICK_LABEL_FONT, DEFAULT_TITLE, TOKEN_CATEGORY_AXIS, TOKEN_DATA_AXIS, TOKEN_SERIES_AXIS
-
-
Constructor Summary
Constructors Constructor Description GroupAxis()
Creates a discrete GroupAxis, sets the default properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Object>
getReferencedObjects()
Get FormulaFields referenced by this Axis.
Can be from marker (if this is MarkerAxis) or from title.int
getShowEachNthTickLabel()
Returns the number for show each nth tick labels.FormulaField
getShowEachNthTickLabelFormula()
Get the showEachNthTickLabelFormula of the GroupAxis.protected java.lang.StringBuilder
getSubProperties(int depth)
Returns the serialized properties of subclasses.java.lang.Integer
getTickLabelMaximumLines()
Returns the maximum number of lines to use for each tick label.java.lang.Double
getTickLabelRotationAngle()
Returns the tick label rotation angle (in radians).java.lang.Float
getTickLabelWidthRatio()
Returns the tick label width ratio, i.e. how much of the label to display.boolean
isAutoFitTickLabel()
Returns whether or not the axis tick labels are automatically adjusted to fit the axis space.void
readProperties(org.w3c.dom.Element element, Chart2 chart)
Loads the XML properties of a chart axis.void
setAutoFitTickLabel(boolean autoFitTickLabel)
Sets whether or not the axis tick labels are automatically adjusted (e.g. by rotating or truncating) to fit the axis space.void
setShowEachNthTickLabel(int showEachNthTickLabel)
Sets the number for show each nth tick labels.void
setShowEachNthTickLabelFormula(FormulaField showEachNthTickLabelFormula)
Set the showEachNthTickLabelFormula of the GroupAxis.void
setTickLabelMaximumLines(java.lang.Integer tickLabelMaximumLines)
Sets the maximum number of lines to use for each tick label.
Note: to use this property turn off the auto label fitting.void
setTickLabelRotationAngle(java.lang.Double tickLabelRotationAngle)
Sets the tick label rotation angle (in radians).
Note: to use this property turn off the automatic label fitting.void
setTickLabelWidthRatio(java.lang.Float tickLabelWidthRatio)
Sets the tick label width ratio, i.e. how much of the label to display. 1 would be the entire label, anything less causes the tick labels to be truncated. 0 means there should be no explicit setting for the maximum label width.-
Methods inherited from class com.inet.report.chart.axis.BaseAxis
copyTo, getAxisLineColor, getAxisPosition, getGridlineColor, getTickLabelColor, getTickLabelFont, getTickLabelFormat, getTitle, isGridlinesVisible, isInverseOrder, saveProperties, saveSubProperties, setAxisLineColor, setAxisPosition, setGridlineColor, setGridlinesVisible, setInverseOrder, setTickLabelColor, setTickLabelFont, setTickLabelFormat, setTitle
-
-
-
-
Field Detail
-
DEFAULT_MAXIMUM_LINES
public static final java.lang.Integer DEFAULT_MAXIMUM_LINES
The default value for maximum lines of label.
-
DEFAULT_ROTATION_ANGLE
public static final java.lang.Double DEFAULT_ROTATION_ANGLE
The default value for rotation angle (in radians).
-
DEFAULT_WIDTH_RATIO
public static final java.lang.Float DEFAULT_WIDTH_RATIO
The default value for width ratio.
-
-
Method Detail
-
isAutoFitTickLabel
public boolean isAutoFitTickLabel()
Returns whether or not the axis tick labels are automatically adjusted to fit the axis space.- Returns:
- whether or not the axis tick labels are automatically adjusted to fit the axis space.
- Since:
- 8.0
- See Also:
setAutoFitTickLabel(boolean)
-
setAutoFitTickLabel
public void setAutoFitTickLabel(boolean autoFitTickLabel)
Sets whether or not the axis tick labels are automatically adjusted (e.g. by rotating or truncating) to fit the axis space.- Parameters:
autoFitTickLabel
- whether to automatically adjust the labels (e.g. by rotating or truncating) so that they fit the axis space- Since:
- 8.0
- See Also:
isAutoFitTickLabel()
-
getTickLabelRotationAngle
public java.lang.Double getTickLabelRotationAngle()
Returns the tick label rotation angle (in radians).- Returns:
- the angle of the tick label rotation
- Since:
- 8.0
- See Also:
setTickLabelRotationAngle(Double)
-
setTickLabelRotationAngle
public void setTickLabelRotationAngle(java.lang.Double tickLabelRotationAngle)
Sets the tick label rotation angle (in radians).
Note: to use this property turn off the automatic label fitting.- Parameters:
tickLabelRotationAngle
- the angle ornull
to ignore this property (should be < Math.PI / 2.0)- Since:
- 8.0
- See Also:
getTickLabelRotationAngle()
,DEFAULT_ROTATION_ANGLE
,setAutoFitTickLabel(boolean)
-
getTickLabelWidthRatio
public java.lang.Float getTickLabelWidthRatio()
Returns the tick label width ratio, i.e. how much of the label to display.- Returns:
- the width ratio
- Since:
- 8.0
- See Also:
setTickLabelWidthRatio(Float)
-
setTickLabelWidthRatio
public void setTickLabelWidthRatio(java.lang.Float tickLabelWidthRatio)
Sets the tick label width ratio, i.e. how much of the label to display. 1 would be the entire label, anything less causes the tick labels to be truncated. 0 means there should be no explicit setting for the maximum label width. Anything greater than 1 will be interpreted as 1.
Note: to use this property turn off the auto label fitting.- Parameters:
tickLabelWidthRatio
- the width ratio, i.e. how much of the tick label to display ornull
to ignore this property- Since:
- 8.0
- See Also:
getTickLabelWidthRatio()
,DEFAULT_WIDTH_RATIO
,setAutoFitTickLabel(boolean)
-
getTickLabelMaximumLines
public java.lang.Integer getTickLabelMaximumLines()
Returns the maximum number of lines to use for each tick label.- Returns:
- the maximum number of lines
- Since:
- 8.0
- See Also:
setTickLabelMaximumLines(Integer)
-
setTickLabelMaximumLines
public void setTickLabelMaximumLines(java.lang.Integer tickLabelMaximumLines)
Sets the maximum number of lines to use for each tick label.
Note: to use this property turn off the auto label fitting.- Parameters:
tickLabelMaximumLines
- the maximum number of lines ornull
to ignore this property- Since:
- 8.0
- See Also:
getTickLabelMaximumLines()
,DEFAULT_MAXIMUM_LINES
,setAutoFitTickLabel(boolean)
-
getShowEachNthTickLabel
public int getShowEachNthTickLabel()
Returns the number for show each nth tick labels. The value 1 means each label will be shown.- Returns:
- the number
- Since:
- 8.0
- See Also:
setShowEachNthTickLabel(int)
-
setShowEachNthTickLabel
public void setShowEachNthTickLabel(int showEachNthTickLabel)
Sets the number for show each nth tick labels. The value 1 means each label will be shown.- Parameters:
showEachNthTickLabel
- the number, the value should be greater zero- Throws:
java.lang.IllegalArgumentException
- by negative or zero value- Since:
- 8.0
- See Also:
getShowEachNthTickLabel()
-
getShowEachNthTickLabelFormula
public FormulaField getShowEachNthTickLabelFormula()
Get the showEachNthTickLabelFormula of the GroupAxis. This formula is used to determine the ShowEachNthLabel value. When null, the result ofgetShowEachNthTickLabel()
is used.- Returns:
- the showEachNthTickLabelFormula of the GroupAxis, can be null.
- Since:
- i-net Clear Reports 13.0
- See Also:
getShowEachNthTickLabel()
,setShowEachNthTickLabelFormula(FormulaField)
-
setShowEachNthTickLabelFormula
public void setShowEachNthTickLabelFormula(FormulaField showEachNthTickLabelFormula)
Set the showEachNthTickLabelFormula of the GroupAxis. This formula is used to determine the ShowEachNthLabel value. When null, the value set tosetShowEachNthTickLabel(int)
is used.- Parameters:
showEachNthTickLabelFormula
- the showEachNthTickLabelFormula of the GroupAxis, can be null.- Since:
- i-net Clear Reports 13.0
- See Also:
setShowEachNthTickLabel(int)
,getShowEachNthTickLabelFormula()
-
getSubProperties
protected java.lang.StringBuilder getSubProperties(int depth)
Returns the serialized properties of subclasses.- Overrides:
getSubProperties
in classBaseAxis
- Parameters:
depth
- the depth of the whitespace indent to prefix each line with- Returns:
- the properties as XML
- Since:
- 8.0
-
readProperties
public void readProperties(org.w3c.dom.Element element, Chart2 chart)
Loads the XML properties of a chart axis.- Overrides:
readProperties
in classBaseAxis
- Parameters:
element
- DOM element to read the properties fromchart
- the chart this axis belongs to- See Also:
BaseAxis.saveProperties(PrintWriter, int, String)
-
getReferencedObjects
public java.util.List<java.lang.Object> getReferencedObjects()
Get FormulaFields referenced by this Axis.
Can be from marker (if this is MarkerAxis) or from title.- Overrides:
getReferencedObjects
in classBaseAxis
- Returns:
- a list with referenced fields, can be empty.
-
-