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 Summary
Constructors Constructor Description AxisItem(ConfigurationEnvelop<NativeObject> envelop)Creates the item using an envelop of native java script object which contains all properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 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.ScaleItem
getAxis, getBasePixel, getBaseValue, getCharbaId, getChart, getDecimalForPixel, getDistanceFromCenterForValue, getDrawingArea, getEnd, getId, getLabelForValue, getLabelRotation, getMax, getMaxAsDate, getMaxAsString, getMin, getMinAsDate, getMinAsString, getPixelForDateValue, getPixelForDateValue, getPixelForDecimal, getPixelForStringValue, getPixelForStringValue, getPixelForTick, getPixelForValue, getPixelForValue, getPointLabels, getStart, getTicks, getType, getValueAtEvent, getValueAtEvent, getValueAtPixel, getValueForDistanceFromCenter, getValueForPixel, getXCenter, getYCenter, isHorizontal
-
Methods inherited from class org.pepstock.charba.client.items.BaseBoxNodeItem
getMaxHeight, getMaxWidth, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getPosition, getWeight, isActive, isFullSize
-
Methods inherited from class org.pepstock.charba.client.items.BaseBoxItem
getBottom, getHeight, getLeft, getRight, getTop, getWidth, isInside
-
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
-
AxisItem
public 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
-
setFullSize
public 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)
-
setWeight
public void setWeight(int weight)
Sets the weight of axis- Parameters:
weight- the weight of axis
-
setMaxWidth
public void setMaxWidth(int maxWidth)
Sets the max width of axis in pixel.- Parameters:
maxWidth- the max width of axis in pixel.
-
setMaxHeight
public void setMaxHeight(int maxHeight)
Sets the max height of the axis in pixel- Parameters:
maxHeight- the max height of the axis in pixel
-
setHeight
public void setHeight(int height)
Sets the height of axis in pixel.- Parameters:
height- the height of axis in pixel.
-
setTop
public void setTop(int top)
Sets the top location in pixel- Parameters:
top- the top location in pixel
-
setBottom
public void setBottom(int bottom)
Sets the bottom location in pixel- Parameters:
bottom- the bottom location in pixel
-
setPaddingLeft
public void setPaddingLeft(int paddingLeft)
Sets the padding left in pixel- Parameters:
paddingLeft- the padding left in pixel
-
setPaddingTop
public void setPaddingTop(int paddingTop)
Sets the padding top in pixel- Parameters:
paddingTop- the padding top in pixel
-
setPaddingRight
public void setPaddingRight(int paddingRight)
Sets the padding right in pixel- Parameters:
paddingRight- the padding right in pixel
-
setPaddingBottom
public void setPaddingBottom(int paddingBottom)
Sets the padding bottom in pixel- Parameters:
paddingBottom- the padding bottom in pixel
-
setMin
public void setMin(String min)
Sets the minimum value of axis- Parameters:
min- the minimum value of axis
-
setMax
public void setMax(String max)
Sets the maximum value of axis- Parameters:
max- the maximum value of axis
-
setMin
public void setMin(double min)
Sets the minimum value of axis- Parameters:
min- the minimum value of axis
-
setMax
public void setMax(double max)
Sets the maximum value of axis- Parameters:
max- the maximum value of axis
-
setMin
public void setMin(Date min)
Sets the minimum value of axis- Parameters:
min- the minimum value of axis
-
setMax
public void setMax(Date max)
Sets the maximum value of axis- Parameters:
max- the maximum value of axis
-
setTicks
public void setTicks(String... ticks)
Sets an array of ticks- Parameters:
ticks- the array of ticks
-
setStart
public void setStart(int start)
Sets the start value of the axis- Parameters:
start- the start value of the axis
-
setEnd
public void setEnd(int end)
Sets the end value of the axis- Parameters:
end- the end value of the axis
-
setLabelRotation
public void setLabelRotation(double labelRotation)
Sets the label rotation value- Parameters:
labelRotation- the label rotation value
-
setWidth
public void setWidth(int width)
Sets the width of axis- Parameters:
width- the width of axis
-
setLeft
public void setLeft(int left)
Sets the left location in pixel- Parameters:
left- the left location in pixel
-
setRight
public void setRight(int right)
Sets the right location in pixel- Parameters:
right- the right location in pixel
-
setPosition
public void setPosition(Position position)
Sets the position of axis- Parameters:
position- the position of axis
-
-