Class DefaultChartScale
- java.lang.Object
- 
- org.pepstock.charba.client.defaults.chart.DefaultChartScale
 
- 
- All Implemented Interfaces:
- IsDefaultScale
 
 public final class DefaultChartScale extends Object implements IsDefaultScale Defaults for scale/axis option element, based on chart type.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Constructor Description DefaultChartScale(Scale scale)Creates the object by scale option element instance.
 - 
Method SummaryAll 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.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.StringgetGraceAsPercentage()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.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.booleanisReverse()Returns the reverses 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.
 
- 
- 
- 
Constructor Detail- 
DefaultChartScalepublic DefaultChartScale(Scale scale) Creates the object by scale option element instance.- Parameters:
- scale- scale option element instance.
 
 
- 
 - 
Method Detail- 
getTitlepublic IsDefaultScaleTitle getTitle() Description copied from interface:IsDefaultScaleReturns the scale title defaults- Specified by:
- getTitlein interface- IsDefaultScale
- Returns:
- the scale title defaults.
 
 - 
getTickspublic IsDefaultTicks getTicks() Description copied from interface:IsDefaultScaleReturns the ticks defaults.- Specified by:
- getTicksin interface- IsDefaultScale
- Returns:
- the ticks defaults.
 
 - 
getGridpublic IsDefaultGrid getGrid() Description copied from interface:IsDefaultScaleReturns the grid defaults.- Specified by:
- getGridin interface- IsDefaultScale
- Returns:
- the grid defaults.
 
 - 
getAngleLinespublic IsDefaultAngleLines getAngleLines() Description copied from interface:IsDefaultScaleReturns the angle lines default.- Specified by:
- getAngleLinesin interface- IsDefaultScale
- Returns:
- the angleLines defaults.
 
 - 
getPointLabelspublic IsDefaultPointLabels getPointLabels() Description copied from interface:IsDefaultScaleReturns the point labels defaults.- Specified by:
- getPointLabelsin interface- IsDefaultScale
- Returns:
- the pointLabels defaults.
 
 - 
getTimepublic IsDefaultTime getTime() Description copied from interface:IsDefaultScaleReturns the time defaults.- Specified by:
- getTimein interface- IsDefaultScale
- Returns:
- the time defaults.
 
 - 
getAdapterspublic IsDefaultAdapters getAdapters() Description copied from interface:IsDefaultScaleReturns the adapter defaults.- Specified by:
- getAdaptersin interface- IsDefaultScale
- Returns:
- the adapter defaults.
 
 - 
isStackedpublic boolean isStacked() Description copied from interface:IsDefaultScaleReturns if the axis are stacked or not.- Specified by:
- isStackedin interface- IsDefaultScale
- Returns:
- if the axis are stacked or not.
 
 - 
isSingleStackedpublic boolean isSingleStacked() Description copied from interface:IsDefaultScaleReturns if you might want to stack positive and negative values together.- Specified by:
- isSingleStackedin interface- IsDefaultScale
- Returns:
- if you might want to stack positive and negative values together
 
 - 
getWeightpublic 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 interface- IsDefaultScale
- Returns:
- weight of axis.
 
 - 
getDisplaypublic Display getDisplay() Description copied from interface:IsDefaultScaleReturns how showing the axis.- Specified by:
- getDisplayin interface- IsDefaultScale
- Returns:
- how showing the axis
 
 - 
isOffsetpublic 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 interface- IsDefaultScale
- Returns:
- extra space of axis.
 
 - 
getPositionpublic 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 interface- IsDefaultScale
- Returns:
- position of axis.
 
 - 
getBoundspublic Bounds getBounds() Description copied from interface:IsDefaultScaleReturns the property controls the scale boundary strategy (bypassed by min/max time options).- Specified by:
- getBoundsin interface- IsDefaultScale
- Returns:
- property controls the scale boundary strategy (bypassed by min/max time options).
 
 - 
isBeginAtZeropublic boolean isBeginAtZero() Description copied from interface:IsDefaultScaleIf true, scale will include 0 if it is not already included.- Specified by:
- isBeginAtZeroin interface- IsDefaultScale
- Returns:
- if true, scale will include 0 if it is not already included.
 
 - 
getGracepublic 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 interface- IsDefaultScale
- Returns:
- the value in pixels is added to the maximum data value and subtracted from the minimum data
 
 - 
getGraceAsPercentagepublic String getGraceAsPercentage() Description copied from interface:IsDefaultScaleReturns 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.- Specified by:
- getGraceAsPercentagein interface- IsDefaultScale
- Returns:
- the value in percentage is added to the maximum data value and subtracted from the minimum data
 
 - 
getMinpublic double getMin() Description copied from interface:IsDefaultScaleReturns the user defined minimum number for the scale, overrides minimum value from data.- Specified by:
- getMinin interface- IsDefaultScale
- Returns:
- the user defined minimum number for the scale, overrides minimum value from data.
 
 - 
getMaxpublic double getMax() Description copied from interface:IsDefaultScaleReturns the user defined maximum number for the scale, overrides maximum value from data.- Specified by:
- getMaxin interface- IsDefaultScale
- Returns:
- user defined maximum number for the scale, overrides maximum value from data.
 
 - 
getSuggestedMaxpublic double getSuggestedMax() Description copied from interface:IsDefaultScaleReturns the adjustment used when calculating the maximum data value.- Specified by:
- getSuggestedMaxin interface- IsDefaultScale
- Returns:
- adjustment used when calculating the maximum data value.
 
 - 
getSuggestedMinpublic double getSuggestedMin() Description copied from interface:IsDefaultScaleReturns the adjustment used when calculating the minimum data value.- Specified by:
- getSuggestedMinin interface- IsDefaultScale
- Returns:
- adjustment used when calculating the minimum data value.
 
 - 
isAlignToPixelspublic boolean isAlignToPixels() Description copied from interface:IsDefaultScaleReturnstrueto align pixel values to device pixels.- Specified by:
- isAlignToPixelsin interface- IsDefaultScale
- Returns:
- trueto align pixel values to device pixels
 
 - 
isReversepublic boolean isReverse() Description copied from interface:IsDefaultScaleReturns the reverses order of tick labels.- Specified by:
- isReversein interface- IsDefaultScale
- Returns:
- reverses order of tick labels.
 
 - 
isAnimatepublic boolean isAnimate() Description copied from interface:IsDefaultScaleReturns whether to animate scaling the chart from the center.- Specified by:
- isAnimatein interface- IsDefaultScale
- Returns:
- whether to animate scaling the chart from the center.
 
 - 
getStartAnglepublic double getStartAngle() Description copied from interface:IsDefaultScaleReturns the starting angle to draw arcs for the first item in a dataset.- Specified by:
- getStartAnglein interface- IsDefaultScale
- Returns:
- starting angle to draw arcs for the first item in a dataset.
 
 - 
getBackgroundColorAsStringpublic String getBackgroundColorAsString() Description copied from interface:IsDefaultScaleReturns the background color of the scale area.- Specified by:
- getBackgroundColorAsStringin interface- IsDefaultScale
- Returns:
- the background color of the scale area.
 
 - 
getStackpublic String getStack() Description copied from interface:IsDefaultScaleReturns the stack group.
 Axes at the same position with same stack are stacked.- Specified by:
- getStackin interface- IsDefaultScale
- Returns:
- the stack group.
 Axes at the same position with same stack are stacked
 
 - 
getStackWeightpublic 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 interface- IsDefaultScale
- Returns:
- the weight of the scale in stack group.
 Used to determine the amount of allocated space for the scale within the group
 
 
- 
 
-