Package org.pepstock.charba.client.items
Class AxisItem
- 
- All Implemented Interfaces:
- IsArea
 
 public final class AxisItem extends ScaleItem There are a number of configuration callbacks that can be used to change parameters in the scale at different points in the update process.
 This is a wrapper of the CHART.JS item with all needed info about an axis.
 Implements allsetmethods to change java script object properties.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Constructor Description AxisItem(ConfigurationEnvelop<NativeObject> envelop)Creates the item using an envelop of native java script object which contains all properties.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description default booleanisInside(NativeBaseEvent event)Returnstrueif the chart event is inside of a chart element, otherwisefalse.default booleanisInside(HasNativeEvent container)Returnstrueif the chart event is inside of this box, otherwisefalse.voidsetBottom(int bottom)Sets the bottom location in pixelvoidsetEnd(int end)Sets the end value of the axisvoidsetFullSize(boolean fullSize)Setstrueif marks that this box should take the full width/height of the canvas (moving other boxes).voidsetHeight(int height)Sets the height of axis in pixel.voidsetLabelRotation(double labelRotation)Sets the label rotation valuevoidsetLeft(int left)Sets the left location in pixelvoidsetMax(double max)Sets the maximum value of axisvoidsetMax(String max)Sets the maximum value of axisvoidsetMax(Date max)Sets the maximum value of axisvoidsetMaxHeight(int maxHeight)Sets the max height of the axis in pixelvoidsetMaxWidth(int maxWidth)Sets the max width of axis in pixel.voidsetMin(double min)Sets the minimum value of axisvoidsetMin(String min)Sets the minimum value of axisvoidsetMin(Date min)Sets the minimum value of axisvoidsetPaddingBottom(int paddingBottom)Sets the padding bottom in pixelvoidsetPaddingLeft(int paddingLeft)Sets the padding left in pixelvoidsetPaddingRight(int paddingRight)Sets the padding right in pixelvoidsetPaddingTop(int paddingTop)Sets the padding top in pixelvoidsetPosition(Position position)Sets the position of axisvoidsetPosition(AxisPositionItem position)Sets the position of axisvoidsetRight(int right)Sets the right location in pixelvoidsetStart(int start)Sets the start value of the axisvoidsetTicks(String... ticks)Sets an array of ticksvoidsetTop(int top)Sets the top location in pixelvoidsetWeight(int weight)Sets the weight of axisvoidsetWidth(int width)Sets the width of axis- 
Methods inherited from class org.pepstock.charba.client.items.ScaleItemformat, format, format, format, getAxis, getBasePixel, getBaseValue, getCharbaId, getChart, getDateAdapter, getDecimalForPixel, getDistanceFromCenterForValue, getDrawingArea, getEnd, getId, getLabelForValue, getLabelItems, getLabelRotation, getMax, getMaxAsDate, getMaxAsString, getMin, getMinAsDate, getMinAsString, getPixelForDateValue, getPixelForDateValue, getPixelForDecimal, getPixelForStringValue, getPixelForStringValue, getPixelForTick, getPixelForValue, getPixelForValue, getPointLabels, getPositionAsItem, getStart, getTicks, getType, getValueAtEvent, getValueAtEvent, getValueAtPixel, getValueForDistanceFromCenter, getValueForPixel, getXCenter, getYCenter, isHorizontal
 - 
Methods inherited from class org.pepstock.charba.client.items.BaseBoxNodeItemgetMaxHeight, getMaxWidth, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPosition, getWeight, isActive, isFullSize
 - 
Methods inherited from class org.pepstock.charba.client.items.BaseBoxItemgetBottom, getHeight, getLeft, getRight, getTop, getWidth, isInside
 - 
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainercheckAndGetColor, 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, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
 
- 
 
- 
- 
- 
Constructor Detail- 
AxisItempublic AxisItem(ConfigurationEnvelop<NativeObject> envelop) Creates the item using an envelop of native java script object which contains all properties.- Parameters:
- envelop- envelop of native java script object which contains all properties.
 
 
- 
 - 
Method Detail- 
setFullSizepublic void setFullSize(boolean fullSize) Setstrueif marks that this box should take the full width/height of the canvas (moving other boxes).- Parameters:
- fullSize-- trueif marks that this box should take the full width/height of the canvas (moving other boxes)
 
 - 
setWeightpublic void setWeight(int weight) Sets the weight of axis- Parameters:
- weight- the weight of axis
 
 - 
setMaxWidthpublic void setMaxWidth(int maxWidth) Sets the max width of axis in pixel.- Parameters:
- maxWidth- the max width of axis in pixel.
 
 - 
setMaxHeightpublic void setMaxHeight(int maxHeight) Sets the max height of the axis in pixel- Parameters:
- maxHeight- the max height of the axis in pixel
 
 - 
setHeightpublic void setHeight(int height) Sets the height of axis in pixel.- Parameters:
- height- the height of axis in pixel.
 
 - 
setToppublic void setTop(int top) Sets the top location in pixel- Parameters:
- top- the top location in pixel
 
 - 
setBottompublic void setBottom(int bottom) Sets the bottom location in pixel- Parameters:
- bottom- the bottom location in pixel
 
 - 
setPaddingLeftpublic void setPaddingLeft(int paddingLeft) Sets the padding left in pixel- Parameters:
- paddingLeft- the padding left in pixel
 
 - 
setPaddingToppublic void setPaddingTop(int paddingTop) Sets the padding top in pixel- Parameters:
- paddingTop- the padding top in pixel
 
 - 
setPaddingRightpublic void setPaddingRight(int paddingRight) Sets the padding right in pixel- Parameters:
- paddingRight- the padding right in pixel
 
 - 
setPaddingBottompublic void setPaddingBottom(int paddingBottom) Sets the padding bottom in pixel- Parameters:
- paddingBottom- the padding bottom in pixel
 
 - 
setMinpublic void setMin(String min) Sets the minimum value of axis- Parameters:
- min- the minimum value of axis
 
 - 
setMaxpublic void setMax(String max) Sets the maximum value of axis- Parameters:
- max- the maximum value of axis
 
 - 
setMinpublic void setMin(double min) Sets the minimum value of axis- Parameters:
- min- the minimum value of axis
 
 - 
setMaxpublic void setMax(double max) Sets the maximum value of axis- Parameters:
- max- the maximum value of axis
 
 - 
setMinpublic void setMin(Date min) Sets the minimum value of axis- Parameters:
- min- the minimum value of axis
 
 - 
setMaxpublic void setMax(Date max) Sets the maximum value of axis- Parameters:
- max- the maximum value of axis
 
 - 
setTickspublic void setTicks(String... ticks) Sets an array of ticks- Parameters:
- ticks- the array of ticks
 
 - 
setStartpublic void setStart(int start) Sets the start value of the axis- Parameters:
- start- the start value of the axis
 
 - 
setEndpublic void setEnd(int end) Sets the end value of the axis- Parameters:
- end- the end value of the axis
 
 - 
setLabelRotationpublic void setLabelRotation(double labelRotation) Sets the label rotation value- Parameters:
- labelRotation- the label rotation value
 
 - 
setWidthpublic void setWidth(int width) Sets the width of axis- Parameters:
- width- the width of axis
 
 - 
setLeftpublic void setLeft(int left) Sets the left location in pixel- Parameters:
- left- the left location in pixel
 
 - 
setRightpublic void setRight(int right) Sets the right location in pixel- Parameters:
- right- the right location in pixel
 
 - 
setPositionpublic void setPosition(Position position) Sets the position of axis- Parameters:
- position- the position of axis
 
 - 
setPositionpublic void setPosition(AxisPositionItem position) Sets the position of axis- Parameters:
- position- the position of axis
 
 - 
isInsidepublic default boolean isInside(NativeBaseEvent event) Returnstrueif the chart event is inside of a chart element, otherwisefalse.- Parameters:
- event- event to check if inside of a chart element.
- Returns:
- trueif the chart event is inside a chart element, otherwise- false
 
 - 
isInsidepublic default boolean isInside(HasNativeEvent container) Returnstrueif the chart event is inside of this box, otherwisefalse.- Parameters:
- container- event container to check if inside the box
- Returns:
- trueif the chart event is inside of this box, otherwise- false
 
 
- 
 
-