Class DefaultScale
- java.lang.Object
-
- org.pepstock.charba.client.defaults.globals.DefaultScale
-
- All Implemented Interfaces:
IsDefaultScale
public final class DefaultScale extends Object implements IsDefaultScale
CHART.JS default values for scale/axis element.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IsDefaultAdaptersgetAdapters()Returns the adapter defaults.IsDefaultAngleLinesgetAngleLines()Returns the angle lines default.StringgetBackgroundColorAsString()Returns the background color of the scale area.IsDefaultScaleBordergetBorder()Returns the border defaults.BoundsgetBounds()Returns the property controls the scale boundary strategy (bypassed by min/max time options).DisplaygetDisplay()Returns how showing the axis.intgetGrace()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.doublegetGraceAsPercentage()Returns the value in percentage, value between 0 and 1, 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.IsDefaultGridgetGrid()Returns the grid defaults.doublegetMax()Returns the user defined maximum number for the scale, overrides maximum value from data.doublegetMin()Returns the user defined minimum number for the scale, overrides minimum value from data.IsDefaultPointLabelsgetPointLabels()Returns the point labels defaults.AxisPositiongetPosition()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'.StringgetStack()Returns the stack group.
Axes at the same position with same stack are stacked.doublegetStackWeight()Returns the weight of the scale in stack group.
Used to determine the amount of allocated space for the scale within the group.doublegetStartAngle()Returns the starting angle to draw arcs for the first item in a dataset.doublegetSuggestedMax()Returns the adjustment used when calculating the maximum data value.doublegetSuggestedMin()Returns the adjustment used when calculating the minimum data value.IsDefaultTicksgetTicks()Returns the ticks defaults.IsDefaultTimegetTime()Returns the time defaults.IsDefaultScaleTitlegetTitle()Returns the scale title defaultsdoublegetWeight()The weight used to sort the axis.booleanisAlignToPixels()Returnstrueto align pixel values to device pixels.booleanisAnimate()Returns whether to animate scaling the chart from the center.booleanisBeginAtZero()If true, scale will include 0 if it is not already included.booleanisOffset()If true, extra space is added to the both edges and the axis is scaled to fit in the chart area.booleanisOffsetAfterAutoskip()Iftrue, bar chart offsets are computed with auto skipped ticks..booleanisReverse()Returns the reversed order of tick labels.booleanisSingleStacked()Returns if you might want to stack positive and negative values together.booleanisStacked()Returns if the axis are stacked or not.
-
-
-
Method Detail
-
getBorder
public IsDefaultScaleBorder getBorder()
Description copied from interface:IsDefaultScaleReturns the border defaults.- Specified by:
getBorderin interfaceIsDefaultScale- Returns:
- the border defaults.
-
getAngleLines
public IsDefaultAngleLines getAngleLines()
Description copied from interface:IsDefaultScaleReturns the angle lines default.- Specified by:
getAngleLinesin interfaceIsDefaultScale- Returns:
- the angleLines defaults.
-
getGrid
public IsDefaultGrid getGrid()
Description copied from interface:IsDefaultScaleReturns the grid defaults.- Specified by:
getGridin interfaceIsDefaultScale- Returns:
- the grid defaults.
-
getPointLabels
public IsDefaultPointLabels getPointLabels()
Description copied from interface:IsDefaultScaleReturns the point labels defaults.- Specified by:
getPointLabelsin interfaceIsDefaultScale- Returns:
- the pointLabels defaults.
-
getTitle
public IsDefaultScaleTitle getTitle()
Description copied from interface:IsDefaultScaleReturns the scale title defaults- Specified by:
getTitlein interfaceIsDefaultScale- Returns:
- the scale title defaults.
-
getTicks
public IsDefaultTicks getTicks()
Description copied from interface:IsDefaultScaleReturns the ticks defaults.- Specified by:
getTicksin interfaceIsDefaultScale- Returns:
- the ticks defaults.
-
getTime
public IsDefaultTime getTime()
Description copied from interface:IsDefaultScaleReturns the time defaults.- Specified by:
getTimein interfaceIsDefaultScale- Returns:
- the time defaults.
-
getAdapters
public IsDefaultAdapters getAdapters()
Description copied from interface:IsDefaultScaleReturns the adapter defaults.- Specified by:
getAdaptersin interfaceIsDefaultScale- Returns:
- the adapter defaults.
-
isStacked
public boolean isStacked()
Description copied from interface:IsDefaultScaleReturns if the axis are stacked or not.- Specified by:
isStackedin interfaceIsDefaultScale- Returns:
- if the axis are stacked or not.
-
isSingleStacked
public boolean isSingleStacked()
Description copied from interface:IsDefaultScaleReturns if you might want to stack positive and negative values together.- Specified by:
isSingleStackedin interfaceIsDefaultScale- Returns:
- if you might want to stack positive and negative values together
-
getWeight
public double getWeight()
Description copied from interface:IsDefaultScaleThe weight used to sort the axis. Higher weights are further away from the chart area.- Specified by:
getWeightin interfaceIsDefaultScale- Returns:
- weight of axis.
-
getDisplay
public Display getDisplay()
Description copied from interface:IsDefaultScaleReturns how showing the axis.- Specified by:
getDisplayin interfaceIsDefaultScale- Returns:
- how showing the axis
-
isOffset
public boolean isOffset()
Description copied from interface:IsDefaultScaleIf true, extra space is added to the both edges and the axis is scaled to fit in the chart area.- Specified by:
isOffsetin interfaceIsDefaultScale- Returns:
- extra space of axis.
-
getPosition
public AxisPosition getPosition()
Description copied from interface:IsDefaultScaleAn 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'.- Specified by:
getPositionin interfaceIsDefaultScale- Returns:
- position of axis.
-
getBounds
public Bounds getBounds()
Description copied from interface:IsDefaultScaleReturns the property controls the scale boundary strategy (bypassed by min/max time options).- Specified by:
getBoundsin interfaceIsDefaultScale- Returns:
- property controls the scale boundary strategy (bypassed by min/max time options).
-
isBeginAtZero
public boolean isBeginAtZero()
Description copied from interface:IsDefaultScaleIf true, scale will include 0 if it is not already included.- Specified by:
isBeginAtZeroin interfaceIsDefaultScale- Returns:
- if true, scale will include 0 if it is not already included.
-
getGrace
public int getGrace()
Description copied from interface:IsDefaultScaleReturns 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.- Specified by:
getGracein interfaceIsDefaultScale- Returns:
- the value in pixels is added to the maximum data value and subtracted from the minimum data
-
getGraceAsPercentage
public double getGraceAsPercentage()
Description copied from interface:IsDefaultScaleReturns the value in percentage, value between 0 and 1, 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.- Specified by:
getGraceAsPercentagein interfaceIsDefaultScale- Returns:
- the value in percentage is added to the maximum data value and subtracted from the minimum data
-
getMin
public double getMin()
Description copied from interface:IsDefaultScaleReturns the user defined minimum number for the scale, overrides minimum value from data.- Specified by:
getMinin interfaceIsDefaultScale- Returns:
- the user defined minimum number for the scale, overrides minimum value from data.
-
getMax
public double getMax()
Description copied from interface:IsDefaultScaleReturns the user defined maximum number for the scale, overrides maximum value from data.- Specified by:
getMaxin interfaceIsDefaultScale- Returns:
- user defined maximum number for the scale, overrides maximum value from data.
-
getSuggestedMax
public double getSuggestedMax()
Description copied from interface:IsDefaultScaleReturns the adjustment used when calculating the maximum data value.- Specified by:
getSuggestedMaxin interfaceIsDefaultScale- Returns:
- adjustment used when calculating the maximum data value.
-
getSuggestedMin
public double getSuggestedMin()
Description copied from interface:IsDefaultScaleReturns the adjustment used when calculating the minimum data value.- Specified by:
getSuggestedMinin interfaceIsDefaultScale- Returns:
- adjustment used when calculating the minimum data value.
-
isAlignToPixels
public boolean isAlignToPixels()
Description copied from interface:IsDefaultScaleReturnstrueto align pixel values to device pixels.- Specified by:
isAlignToPixelsin interfaceIsDefaultScale- Returns:
trueto align pixel values to device pixels
-
isReverse
public boolean isReverse()
Description copied from interface:IsDefaultScaleReturns the reversed order of tick labels.- Specified by:
isReversein interfaceIsDefaultScale- Returns:
- reversed order of tick labels.
-
isAnimate
public boolean isAnimate()
Description copied from interface:IsDefaultScaleReturns whether to animate scaling the chart from the center.- Specified by:
isAnimatein interfaceIsDefaultScale- Returns:
- whether to animate scaling the chart from the center.
-
getStartAngle
public double getStartAngle()
Description copied from interface:IsDefaultScaleReturns the starting angle to draw arcs for the first item in a dataset.- Specified by:
getStartAnglein interfaceIsDefaultScale- Returns:
- starting angle to draw arcs for the first item in a dataset.
-
getBackgroundColorAsString
public String getBackgroundColorAsString()
Description copied from interface:IsDefaultScaleReturns the background color of the scale area.- Specified by:
getBackgroundColorAsStringin interfaceIsDefaultScale- Returns:
- the background color of the scale area.
-
getStack
public String getStack()
Description copied from interface:IsDefaultScaleReturns the stack group.
Axes at the same position with same stack are stacked.- Specified by:
getStackin interfaceIsDefaultScale- Returns:
- the stack group.
Axes at the same position with same stack are stacked
-
getStackWeight
public double getStackWeight()
Description copied from interface:IsDefaultScaleReturns the weight of the scale in stack group.
Used to determine the amount of allocated space for the scale within the group.- Specified by:
getStackWeightin interfaceIsDefaultScale- Returns:
- the weight of the scale in stack group.
Used to determine the amount of allocated space for the scale within the group
-
isOffsetAfterAutoskip
public boolean isOffsetAfterAutoskip()
Description copied from interface:IsDefaultScaleIftrue, bar chart offsets are computed with auto skipped ticks..- Specified by:
isOffsetAfterAutoskipin interfaceIsDefaultScale- Returns:
- if
true, bar chart offsets are computed with auto skipped ticks..
-
-