Class Bar
- 
- All Implemented Interfaces:
- IsDefaultBar,- IsDefaultOptionsElement,- IsDefaultPointStyleHandler,- HasPointStyle
 
 public class Bar extends AbstractElement<IsDefaultBar> implements IsDefaultBar, HasPointStyle Bar elements are used to represent the bars in a bar chart.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedBar(Elements elements, Key childKey, IsDefaultBar defaultValues, NativeObject nativeObject)Creates the object with the parent, the key of this element, default values and native object to map java script properties.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetBase()Returns the base value for the bar in data units along the value axis.
 If not set, defaults to the value axis base value.intgetBorderRadius()Returns the bar border radius (in pixels).BorderSkippedgetBorderSkipped()Returns the edge to skip drawing the border for.intgetHoverBorderRadius()Returns the bar border radius (in pixels) when hovered.intgetInflateAmount()Returns the amount of pixels to inflate the bar rectangles, when drawing.PointStyleHandlergetPointStyleHandler()Returns a point style handler instance to use in the default methods of this interface.booleanisAutoInflateAmount()Returnstrueif the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.booleanisEnableBorderRadius()Iftrue, it only shows the borderRadius of a bar when the bar is at the end of the stack.voidsetAutoInflateAmount(boolean autoInflateAmount)Setstrueif the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.voidsetBase(double base)Sets the base value for the bar in data units along the value axis.
 If not set, defaults to the value axis base value.voidsetBorderRadius(int borderRadius)Sets the bar border radius (in pixels).voidsetBorderSkipped(boolean borderskip)Sets the edge to skip drawing the border for.voidsetBorderSkipped(BorderSkipped position)Sets the edge to skip drawing the border for.voidsetEnableBorderRadius(boolean enableBorderRadius)Iftrue, it only shows the borderRadius of a bar when the bar is at the end of the stack.voidsetHoverBorderRadius(int borderRadius)Sets the bar border radius (in pixels) when hovered.voidsetInflateAmount(int inflateAmount)Sets the amount of pixels to inflate the bar rectangles, when drawing.- 
Methods inherited from class org.pepstock.charba.client.options.AbstractElementgetBackgroundColor, getBackgroundColorAsString, getBorderColor, getBorderColorAsString, getBorderWidth, getHoverBackgroundColor, getHoverBackgroundColorAsString, getHoverBorderColor, getHoverBorderColorAsString, getHoverBorderWidth, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderWidth, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderWidth
 - 
Methods inherited from class org.pepstock.charba.client.options.AbstractModelgetDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
 - 
Methods inherited from class org.pepstock.charba.client.commons.AbstractNodecheckAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, 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
 - 
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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.pepstock.charba.client.options.HasPointStylegetPointStyle, getPointStyleAsCanvas, getPointStyleAsImage, getPointStyleType, setPointStyle, setPointStyle, setPointStyle, setPointStyle
 - 
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultOptionsElementgetBackgroundColorAsString, getBorderColorAsString, getBorderWidth, getHoverBackgroundColorAsString, getHoverBorderColorAsString, getHoverBorderWidth
 
- 
 
- 
- 
- 
Constructor Detail- 
Barprotected Bar(Elements elements, Key childKey, IsDefaultBar defaultValues, NativeObject nativeObject) Creates the object with the parent, the key of this element, default values and native object to map java script properties.- Parameters:
- elements- parent node to use to add this element where changed
- childKey- the property name of this element to use to add it to the parent.
- defaultValues- default provider
- nativeObject- native object to map java script properties
 
 
- 
 - 
Method Detail- 
getPointStyleHandlerpublic PointStyleHandler getPointStyleHandler() Description copied from interface:HasPointStyleReturns a point style handler instance to use in the default methods of this interface.- Specified by:
- getPointStyleHandlerin interface- HasPointStyle
- Returns:
- a point style handler instance
 
 - 
setEnableBorderRadiuspublic void setEnableBorderRadius(boolean enableBorderRadius) Iftrue, it only shows the borderRadius of a bar when the bar is at the end of the stack.- Parameters:
- enableBorderRadius- if- true, it only shows the borderRadius of a bar when the bar is at the end of the stack
 
 - 
isEnableBorderRadiuspublic boolean isEnableBorderRadius() Iftrue, it only shows the borderRadius of a bar when the bar is at the end of the stack.- Specified by:
- isEnableBorderRadiusin interface- IsDefaultBar
- Returns:
- if true, it only shows the borderRadius of a bar when the bar is at the end of the stack
 
 - 
setBasepublic void setBase(double base) Sets the base value for the bar in data units along the value axis.
 If not set, defaults to the value axis base value.- Parameters:
- base- base value for the bar in data units along the value axis.
 If not set, defaults to the value axis base value
 
 - 
getBasepublic double getBase() Returns the base value for the bar in data units along the value axis.
 If not set, defaults to the value axis base value.- Specified by:
- getBasein interface- IsDefaultBar
- Returns:
- base value for the bar in data units along the value axis.
 If not set, defaults to the value axis base value
 
 - 
setBorderSkippedpublic void setBorderSkipped(boolean borderskip) Sets the edge to skip drawing the border for.- Parameters:
- borderskip- to set- falseas border skipped.
 
 - 
setBorderSkippedpublic void setBorderSkipped(BorderSkipped position) Sets the edge to skip drawing the border for.- Parameters:
- position- the edge to skip drawing the border for.
 
 - 
getBorderSkippedpublic BorderSkipped getBorderSkipped() Returns the edge to skip drawing the border for.- Specified by:
- getBorderSkippedin interface- IsDefaultBar
- Returns:
- the edge to skip drawing the border for.
 
 - 
setBorderRadiuspublic void setBorderRadius(int borderRadius) Sets the bar border radius (in pixels).- Parameters:
- borderRadius- the bar border radius (in pixels).
 
 - 
getBorderRadiuspublic int getBorderRadius() Returns the bar border radius (in pixels).- Specified by:
- getBorderRadiusin interface- IsDefaultBar
- Returns:
- the bar border radius (in pixels).
 
 - 
setHoverBorderRadiuspublic void setHoverBorderRadius(int borderRadius) Sets the bar border radius (in pixels) when hovered.- Parameters:
- borderRadius- the bar border radius (in pixels) when hovered.
 
 - 
getHoverBorderRadiuspublic int getHoverBorderRadius() Returns the bar border radius (in pixels) when hovered.- Specified by:
- getHoverBorderRadiusin interface- IsDefaultBar
- Returns:
- the bar border radius (in pixels) when hovered.
 
 - 
setAutoInflateAmountpublic void setAutoInflateAmount(boolean autoInflateAmount) Setstrueif the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.- Parameters:
- autoInflateAmount-- trueif the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated
 
 - 
isAutoInflateAmountpublic boolean isAutoInflateAmount() Returnstrueif the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.- Specified by:
- isAutoInflateAmountin interface- IsDefaultBar
- Returns:
- trueif the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated
 
 - 
setInflateAmountpublic void setInflateAmount(int inflateAmount) Sets the amount of pixels to inflate the bar rectangles, when drawing.- Parameters:
- inflateAmount- the amount of pixels to inflate the bar rectangles, when drawing
 
 - 
getInflateAmountpublic int getInflateAmount() Returns the amount of pixels to inflate the bar rectangles, when drawing.- Specified by:
- getInflateAmountin interface- IsDefaultBar
- Returns:
- the amount of pixels to inflate the bar rectangles, when drawing
 
 
- 
 
-