public class Bar extends AbstractElement<IsDefaultBar> implements IsDefaultBar
| Modifier | Constructor and Description |
|---|---|
protected |
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.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBorderRadius()
Returns the bar border radius (in pixels).
|
BorderSkipped |
getBorderSkipped()
Returns the edge to skip drawing the border for.
|
int |
getHoverBorderRadius()
Returns the bar border radius (in pixels) when hovered.
|
default PointStyle |
getPointStyle()
Returns the style of the point.
|
default Canvas |
getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returns null. |
default Img |
getPointStyleAsImage()
Returns the style of the point as image.
If property is missing or not an image, returns null. |
org.pepstock.charba.client.options.PointStyleHandler |
getPointStyleHandler()
Returns a point style handler instance to use in the default methods of this interface.
|
default PointStyleType |
getPointStyleType()
Returns the type of point style.
|
boolean |
isEnableBorderRadius()
If
true, it only shows the borderRadius of a bar when the bar is at the end of the stack. |
void |
setBorderRadius(int borderRadius)
Sets the bar border radius (in pixels).
|
void |
setBorderSkipped(boolean borderskip)
Sets the edge to skip drawing the border for.
|
void |
setBorderSkipped(BorderSkipped position)
Sets the edge to skip drawing the border for.
|
void |
setEnableBorderRadius(boolean enableBorderRadius)
If
true, it only shows the borderRadius of a bar when the bar is at the end of the stack. |
void |
setHoverBorderRadius(int borderRadius)
Sets the bar border radius (in pixels) when hovered.
|
default void |
setPointStyle(Canvas pointStyle)
Sets the style of the point as canvas.
|
default void |
setPointStyle(Img pointStyle)
Sets the style of the point as image.
|
default void |
setPointStyle(PointStyle pointStyle)
Sets the style of the point.
|
getBackgroundColor, getBackgroundColorAsString, getBorderColor, getBorderColorAsString, getBorderWidth, getHoverBackgroundColor, getHoverBackgroundColorAsString, getHoverBorderColor, getHoverBorderColorAsString, getHoverBorderWidth, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderWidth, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderWidthgetDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModelcheckAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, 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, setValueOrArrayAndAddToParentcheckDefaultValuesArgument, 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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBackgroundColorAsString, getBorderColorAsString, getBorderWidth, getHoverBackgroundColorAsString, getHoverBorderColorAsString, getHoverBorderWidthprotected Bar(Elements elements, Key childKey, IsDefaultBar defaultValues, NativeObject nativeObject)
elements - parent node to use to add this element where changedchildKey - the property name of this element to use to add it to the parent.defaultValues - default providernativeObject - native object to map java script propertiespublic org.pepstock.charba.client.options.PointStyleHandler getPointStyleHandler()
public void setEnableBorderRadius(boolean enableBorderRadius)
true, it only shows the borderRadius of a bar when the bar is at the end of the stack.enableBorderRadius - if true, it only shows the borderRadius of a bar when the bar is at the end of the stackpublic boolean isEnableBorderRadius()
true, it only shows the borderRadius of a bar when the bar is at the end of the stack.isEnableBorderRadius in interface IsDefaultBartrue, it only shows the borderRadius of a bar when the bar is at the end of the stackpublic void setBorderSkipped(boolean borderskip)
borderskip - to set false as border skipped. If set true, is ignoredpublic void setBorderSkipped(BorderSkipped position)
position - the edge to skip drawing the border for.public BorderSkipped getBorderSkipped()
getBorderSkipped in interface IsDefaultBarpublic void setBorderRadius(int borderRadius)
borderRadius - the bar border radius (in pixels).public int getBorderRadius()
getBorderRadius in interface IsDefaultBarpublic void setHoverBorderRadius(int borderRadius)
borderRadius - the bar border radius (in pixels) when hovered.public int getHoverBorderRadius()
getHoverBorderRadius in interface IsDefaultBarpublic void setPointStyle(PointStyle pointStyle)
pointStyle - array of the style of the point.public PointStyle getPointStyle()
getPointStyle in interface IsDefaultPointStyleHandlernull if point style is set as imagepublic void setPointStyle(Img pointStyle)
pointStyle - image element of the style of the point as image.public PointStyleType getPointStyleType()
getPointStyleType in interface IsDefaultPointStyleHandlerpublic Img getPointStyleAsImage()
null.getPointStyleAsImage in interface IsDefaultPointStyleHandlernull.public void setPointStyle(Canvas pointStyle)
pointStyle - canvas element of the style of the point as canvas.public Canvas getPointStyleAsCanvas()
null.getPointStyleAsCanvas in interface IsDefaultPointStyleHandlernull.