Class Scale
-
- All Implemented Interfaces:
HasLabels
,IsDefaultScale
- Direct Known Subclasses:
ExtendedScale
public class Scale extends AbstractScale
Scales are an integral part of a chart.
They are used to determine how data maps to a pixel value on the chart.
- linear
- logarithmic
- category
- time
- time series
- radial linear
- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Scale(AxisType type, IsDefaultScale defaultValues, NativeObject nativeObject)
Creates the object only with aixs type, default provider and native object.
This is used when the default scale is read byDefaults.getScale(AxisType)
.protected
Scale(IsDefaultScale defaultValues, NativeObject nativeObject)
Creates the object only with default provider and native object.
This is used when the scale is read byScales
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AxisKind
getAxis()
Which kind of axis this is.
Possible values are: ''x', 'y' or 'r'.ScaleId
getId()
Returns the id of scale.
It is usually used to link data sets and scale axes together.
This is especially needed if multi-axes charts are used.AxisType
getType()
Returns the type of axis.-
Methods inherited from class org.pepstock.charba.client.options.AbstractScale
getAdapters, getAngleLines, getBackgroundColor, getBackgroundColorAsString, getBounds, getDisplay, getGrace, getGraceAsPercentage, getGrid, getLabelsHandler, getMax, getMaxAsDate, getMaxAsString, getMaxIndex, getMin, getMinAsDate, getMinAsString, getMinIndex, getPointLabels, getPosition, getStack, getStackWeight, getStartAngle, getSuggestedMax, getSuggestedMin, getTicks, getTime, getTitle, getWeight, isAlignToPixels, isAnimate, isBeginAtZero, isOffset, isReverse, isSingleStacked, isStacked, setAlignToPixels, setAnimate, setBackgroundColor, setBackgroundColor, setBeginAtZero, setBounds, setDisplay, setDisplay, setGrace, setGraceAsPercentage, setLabels, setLabels, setMax, setMax, setMax, setMaxIndex, setMin, setMin, setMin, setMinIndex, setOffset, setPosition, setReverse, setSingleStacked, setStack, setStacked, setStackWeight, setStartAngle, setSuggestedMax, setSuggestedMin, setWeight
-
Methods inherited from class org.pepstock.charba.client.options.AbstractModel
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Constructor Detail
-
Scale
protected Scale(IsDefaultScale defaultValues, NativeObject nativeObject)
Creates the object only with default provider and native object.
This is used when the scale is read byScales
.- Parameters:
defaultValues
- default provider instance.nativeObject
- native object to store properties.
-
Scale
protected Scale(AxisType type, IsDefaultScale defaultValues, NativeObject nativeObject)
Creates the object only with aixs type, default provider and native object.
This is used when the default scale is read byDefaults.getScale(AxisType)
.- Parameters:
type
- scale typedefaultValues
- default provider instance.nativeObject
- native object to store properties.
-
-
Method Detail
-
getId
public final ScaleId getId()
Returns the id of scale.
It is usually used to link data sets and scale axes together.
This is especially needed if multi-axes charts are used.- Returns:
- The ID is used to link data sets and scale axes together or
DefaultScaleId.UNKNOWN
if not set
-
getType
public final AxisType getType()
Returns the type of axis.- Returns:
- the type of axis.
-
getAxis
public final AxisKind getAxis()
Which kind of axis this is.
Possible values are: ''x', 'y' or 'r'.- Returns:
- the kind of axis.
-
-