Package org.pepstock.charba.client.enums
Enum ChartAxisType
- java.lang.Object
-
- java.lang.Enum<ChartAxisType>
-
- org.pepstock.charba.client.enums.ChartAxisType
-
- All Implemented Interfaces:
Serializable
,Comparable<ChartAxisType>
,Key
,PropertyKey
,AxisType
public enum ChartAxisType extends Enum<ChartAxisType> implements AxisType
Axes are an integral part of a chart. They are used to determine how data maps to a pixel value on the chart.
These are the possible types of an axis.- Author:
- Andrea "Stock" Stocchero
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CATEGORY
The labels are drawn from one of the label arrays included in the chart data.LINEAR
The linear scale is use to chart numerical data.LOGARITHMIC
The logarithmic scale is use to chart numerical data.RADIAL_LINEAR
Radial axes are used specifically for the radar and polar area chart types.
These axes overlay the chart area, rather than being positioned on one of the edges.
The linear scale is use to chart numerical data.
The linear interpolation is used to determine where a value lies in relation the center of the axis.TIME
The time scale is used to display times and dates.TIMESERIES
The time series scale is used to display times and dates.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AxisType
getBaseType()
Returns the base type (extended) for this axis type.ScaleDataType
getDataType()
Returns the type of managed data for this axis type.ScaleId
getDefaultScaleId()
Returns the default scale id for this axis type.boolean
is(String type)
Returnstrue
if the passed type is the a default one.boolean
is(AxisType type)
Returnstrue
if the passed type is the a default one.String
value()
Returns the name value of propertystatic ChartAxisType
valueOf(String name)
Returns the enum constant of this type with the specified name.static ChartAxisType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LINEAR
public static final ChartAxisType LINEAR
The linear scale is use to chart numerical data. It can be placed on either the x or y axis.
The linear interpolation is used to determine where a value lies on the axis.
-
LOGARITHMIC
public static final ChartAxisType LOGARITHMIC
The logarithmic scale is use to chart numerical data. It can be placed on either the x or y axis.
The logarithmic interpolation is used to determine where a value lies on the axis.
-
CATEGORY
public static final ChartAxisType CATEGORY
The labels are drawn from one of the label arrays included in the chart data.
-
TIME
public static final ChartAxisType TIME
The time scale is used to display times and dates. When building its ticks, it will automatically calculate the most comfortable unit base on the size of the scale.
-
TIMESERIES
public static final ChartAxisType TIMESERIES
The time series scale is used to display times and dates. When building its ticks, it will automatically calculate the most comfortable unit base on the size of the scale.
-
RADIAL_LINEAR
public static final ChartAxisType RADIAL_LINEAR
Radial axes are used specifically for the radar and polar area chart types.
These axes overlay the chart area, rather than being positioned on one of the edges.
The linear scale is use to chart numerical data.
The linear interpolation is used to determine where a value lies in relation the center of the axis.
-
-
Method Detail
-
values
public static ChartAxisType[] 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 (ChartAxisType c : ChartAxisType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChartAxisType 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
-
is
public boolean is(AxisType type)
Returnstrue
if the passed type is the a default one.- Parameters:
type
- type to be checked- Returns:
true
if the passed type is the a default one
-
is
public boolean is(String type)
Returnstrue
if the passed type is the a default one.- Parameters:
type
- type to be checked- Returns:
true
if the passed type is the a default one
-
value
public String value()
Description copied from interface:Key
Returns the name value of property
-
getDefaultScaleId
public ScaleId getDefaultScaleId()
Description copied from interface:AxisType
Returns the default scale id for this axis type.- Specified by:
getDefaultScaleId
in interfaceAxisType
- Returns:
- the default scale id for this axis type
-
getDataType
public ScaleDataType getDataType()
Description copied from interface:AxisType
Returns the type of managed data for this axis type.- Specified by:
getDataType
in interfaceAxisType
- Returns:
- the type of managed data for this axis type
-
getBaseType
public AxisType getBaseType()
Description copied from interface:AxisType
Returns the base type (extended) for this axis type.- Specified by:
getBaseType
in interfaceAxisType
- Returns:
- the base type (extended) for this axis type
-
-