public abstract class AbstractScale extends AbstractModel<Options,IsDefaultScale> implements IsDefaultScale, HasLabels
Modifier | Constructor and Description |
---|---|
protected |
AbstractScale(IsDefaultScale defaultValues,
NativeObject nativeObject)
Creates the object only with default provider and native object.
|
Modifier and Type | Method and Description |
---|---|
Adapters |
getAdapters()
Returns the adapters element.
|
AngleLines |
getAngleLines()
Returns the angle lines element.
|
IsColor |
getBackgroundColor()
Returns the background color of the scale area.
|
String |
getBackgroundColorAsString()
Returns the background color of the scale area.
|
Bounds |
getBounds()
Returns the property controls the scale boundary strategy (bypassed by min/max time options).
|
Display |
getDisplay()
The display option controls the visibility of axis.
Controls the axis global visibility (visible when true, hidden when false). |
int |
getGrace()
Returns the value in pixels is added to the maximum data value and subtracted from the minimum data.
This extends the scale range as if the data values were that much greater. |
String |
getGraceAsPercentage()
Returns the value in percentage is added to the maximum data value and subtracted from the minimum data.
This extends the scale range as if the data values were that much greater. |
Grid |
getGrid()
Returns the grid element.
|
LabelsHandler |
getLabelsHandler()
Returns an labels option handler instance.
|
double |
getMax()
Returns the user defined maximum number for the scale, overrides maximum value from data.
|
Date |
getMaxAsDate()
If defined, this will override the data maximum.
|
String |
getMaxAsString()
Returns the user defined maximum number for the scale, overrides maximum value from data.
|
int |
getMaxIndex()
Returns the maximum item at passed index to display.
|
double |
getMin()
Returns the user defined minimum number for the scale, overrides minimum value from data.
|
Date |
getMinAsDate()
If defined, this will override the data minimum.
|
String |
getMinAsString()
Returns the user defined minimum number for the scale, overrides minimum value from data.
|
int |
getMinIndex()
Returns the minimum item at passed index to display
|
PointLabels |
getPointLabels()
Returns the point labels element.
|
AxisPosition |
getPosition()
An axis can either be positioned at the edge of the chart, at the center of the chart area, or dynamically with respect to a data value.
To position the axis at the edge of the chart, set the position option to one of: 'top', 'left', 'bottom', 'right'. To position the axis at the center of the chart area, set the position option to 'center'. |
String |
getStack()
Returns the stack group.
Axes at the same position with same stack are stacked. |
double |
getStackWeight()
Returns the weight of the scale in stack group.
Used to determine the amount of allocated space for the scale within the group. |
double |
getStartAngle()
Returns the starting angle to draw arcs for the first item in a data set.
|
double |
getSuggestedMax()
Returns the adjustment used when calculating the maximum data value.
|
double |
getSuggestedMin()
Returns the adjustment used when calculating the minimum data value.
|
Ticks |
getTicks()
Returns the ticks element.
|
Time |
getTime()
Returns the time element.
|
ScaleTitle |
getTitle()
Returns the scale title element.
|
double |
getWeight()
The weight used to sort the axis.
|
boolean |
isAlignToPixels()
Returns
true to align pixel values to device pixels. |
boolean |
isAnimate()
Returns whether to animate scaling the chart from the center.
|
boolean |
isBeginAtZero()
If
true , scale will include 0 if it is not already included. |
boolean |
isOffset()
If
true , extra space is added to the both edges and the axis is scaled to fit in the the chart area. |
boolean |
isReverse()
Returns the reverses order of tick labels.
|
boolean |
isSingleStacked()
Returns if you might want to stack positive and negative values together.
|
boolean |
isStacked()
Returns if the axis are stacked or not.
|
void |
setAlignToPixels(boolean alignToPixels)
Sets
true to align pixel values to device pixels. |
void |
setAnimate(boolean animate)
Sets whether to animate scaling the chart from the center.
|
void |
setBackgroundColor(IsColor backgroundColor)
Sets the default background color to use in the chart, on all objects, if not override by the specific configuration.
|
void |
setBackgroundColor(String backgroundColor)
Sets the background color of the scale area.
|
void |
setBeginAtZero(boolean beginAtZero)
If
true , scale will include 0 if it is not already included. |
void |
setBounds(Bounds bounds)
Sets the property controls the scale boundary strategy (bypassed by min/max time options).
|
void |
setDisplay(boolean display)
If
true , shows the axis. |
void |
setDisplay(Display display)
The display option controls the visibility of axis.
Controls the axis global visibility (visible when true, hidden when false). |
void |
setGrace(int grace)
Sets the value in pixels is added to the maximum data value and subtracted from the minimum data.
This extends the scale range as if the data values were that much greater. |
void |
setGraceAsPercentage(String grace)
Sets the value in percentage is added to the maximum data value and subtracted from the minimum data.
This extends the scale range as if the data values were that much greater. |
void |
setLabels(Labels labels)
Sets the labels of the data.
|
void |
setLabels(String... labels)
Sets the labels of the data.
|
void |
setMax(Date max)
If defined, this will override the data maximum.
|
void |
setMax(double max)
Sets the user defined maximum number for the scale, overrides maximum value from data.
|
void |
setMax(String max)
Sets the user defined maximum number for the scale, overrides maximum value from data.
|
void |
setMaxIndex(int max)
Sets the maximum item at passed index to display.
|
void |
setMin(Date min)
If defined, this will override the data minimum.
|
void |
setMin(double min)
Sets the user defined minimum number for the scale, overrides minimum value from data.
|
void |
setMin(String min)
Sets the user defined minimum number for the scale, overrides minimum value from data.
|
void |
setMinIndex(int min)
Sets the minimum item at passed index to display.
|
void |
setOffset(boolean offset)
If
true , extra space is added to the both edges and the axis is scaled to fit in the the chart area. |
void |
setPosition(AxisPosition position)
An axis can either be positioned at the edge of the chart, at the center of the chart area, or dynamically with respect to a data value.
To position the axis at the edge of the chart, set the position option to one of: 'top', 'left', 'bottom', 'right'. To position the axis at the center of the chart area, set the position option to 'center'. |
void |
setReverse(boolean reverse)
Sets the reverses order of tick labels.
|
void |
setSingleStacked(boolean stacked)
Sets if you might want to stack positive and negative values together.
|
void |
setStack(String stack)
Sets the stack group.
Axes at the same position with same stack are stacked. |
void |
setStacked(boolean stacked)
Sets if the axis are stacked or not.
|
void |
setStackWeight(double stackWeight)
Sets the weight of the scale in stack group.
Used to determine the amount of allocated space for the scale within the group. |
void |
setStartAngle(double startAngle)
Sets the starting angle to draw arcs for the first item in a data set.
|
void |
setSuggestedMax(double suggestedMax)
Sets the adjustment used when calculating the maximum data value.
|
void |
setSuggestedMin(double suggestedMin)
Sets the adjustment used when calculating the minimum data value.
|
void |
setWeight(double weight)
The weight used to sort the axis.
|
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
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, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
protected AbstractScale(IsDefaultScale defaultValues, NativeObject nativeObject)
defaultValues
- default provider instance.nativeObject
- native object to store properties.public final LabelsHandler getLabelsHandler()
HasLabels
getLabelsHandler
in interface HasLabels
public final ScaleTitle getTitle()
getTitle
in interface IsDefaultScale
public final Ticks getTicks()
getTicks
in interface IsDefaultScale
public final Grid getGrid()
getGrid
in interface IsDefaultScale
public final AngleLines getAngleLines()
getAngleLines
in interface IsDefaultScale
public final PointLabels getPointLabels()
getPointLabels
in interface IsDefaultScale
public final Time getTime()
getTime
in interface IsDefaultScale
public final Adapters getAdapters()
getAdapters
in interface IsDefaultScale
public final void setBeginAtZero(boolean beginAtZero)
true
, scale will include 0 if it is not already included.beginAtZero
- if true
, scale will include 0 if it is not already included.public final boolean isBeginAtZero()
true
, scale will include 0 if it is not already included.isBeginAtZero
in interface IsDefaultScale
true
, scale will include 0 if it is not already included.public void setBackgroundColor(IsColor backgroundColor)
backgroundColor
- background color to use in the chart.public void setBackgroundColor(String backgroundColor)
backgroundColor
- the background color of the scale area.public String getBackgroundColorAsString()
getBackgroundColorAsString
in interface IsDefaultScale
public IsColor getBackgroundColor()
public final void setGrace(int grace)
grace
- the value in pixels is added to the maximum data value and subtracted from the minimum datapublic final int getGrace()
getGrace
in interface IsDefaultScale
public final void setGraceAsPercentage(String grace)
grace
- the value in percentage is added to the maximum data value and subtracted from the minimum datapublic final String getGraceAsPercentage()
getGraceAsPercentage
in interface IsDefaultScale
public final void setMin(double min)
min
- the user defined minimum number for the scale, overrides minimum value from data.public final double getMin()
getMin
in interface IsDefaultScale
public final void setMin(Date min)
min
- If defined, this will override the data minimum.public final Date getMinAsDate()
public final void setMax(double max)
max
- user defined maximum number for the scale, overrides maximum value from data.public final double getMax()
getMax
in interface IsDefaultScale
public final void setMax(Date max)
max
- if defined, this will override the data maximum.public final Date getMaxAsDate()
public final void setMin(String min)
min
- the user defined minimum number for the scale, overrides minimum value from data.public final String getMinAsString()
public final void setMax(String max)
max
- user defined maximum number for the scale, overrides maximum value from data.public final String getMaxAsString()
public final void setMinIndex(int min)
min
- The minimum item at passed index to displaypublic final int getMinIndex()
public final void setMaxIndex(int max)
max
- the maximum item at passed index to display.public final int getMaxIndex()
public final void setSuggestedMax(double suggestedMax)
suggestedMax
- adjustment used when calculating the maximum data value.public final double getSuggestedMax()
getSuggestedMax
in interface IsDefaultScale
public final void setSuggestedMin(double suggestedMin)
suggestedMin
- adjustment used when calculating the minimum data value.public final double getSuggestedMin()
getSuggestedMin
in interface IsDefaultScale
public final void setAlignToPixels(boolean alignToPixels)
true
to align pixel values to device pixels.alignToPixels
- true
to align pixel values to device pixels.public final boolean isAlignToPixels()
true
to align pixel values to device pixels.isAlignToPixels
in interface IsDefaultScale
true
to align pixel values to device pixelspublic final void setReverse(boolean reverse)
reverse
- reverses order of tick labels.public final boolean isReverse()
isReverse
in interface IsDefaultScale
true
reverses order of tick labels.public final void setStacked(boolean stacked)
stacked
- if the axis are stacked or not.public final boolean isStacked()
isStacked
in interface IsDefaultScale
public final void setSingleStacked(boolean stacked)
stacked
- if you might want to stack positive and negative values togetherpublic final boolean isSingleStacked()
isSingleStacked
in interface IsDefaultScale
public final void setWeight(double weight)
weight
- weight of axispublic final double getWeight()
getWeight
in interface IsDefaultScale
public final void setDisplay(boolean display)
true
, shows the axis.display
- if true
, shows the axes.public final void setDisplay(Display display)
display
- display option controls the visibility of axispublic final Display getDisplay()
getDisplay
in interface IsDefaultScale
public final void setOffset(boolean offset)
true
, extra space is added to the both edges and the axis is scaled to fit in the the chart area.offset
- extra space of axispublic final boolean isOffset()
true
, extra space is added to the both edges and the axis is scaled to fit in the the chart area.isOffset
in interface IsDefaultScale
public final void setPosition(AxisPosition position)
position
- position of axispublic final AxisPosition getPosition()
getPosition
in interface IsDefaultScale
public final void setBounds(Bounds bounds)
bounds
- property controls the scale boundary strategy (bypassed by min/max time options).public final Bounds getBounds()
getBounds
in interface IsDefaultScale
public final void setStack(String stack)
stack
- the stack group.public final String getStack()
getStack
in interface IsDefaultScale
public final void setStackWeight(double stackWeight)
stackWeight
- the weight of the scale in stack group.public final double getStackWeight()
getStackWeight
in interface IsDefaultScale
public final void setLabels(String... labels)
public final void setLabels(Labels labels)
public final void setAnimate(boolean animate)
animate
- whether to animate scaling the chart from the center.public final boolean isAnimate()
isAnimate
in interface IsDefaultScale
public void setStartAngle(double startAngle)
startAngle
- starting angle to draw arcs for the first item in a data set.public double getStartAngle()
getStartAngle
in interface IsDefaultScale