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, setHoverBorderWidth
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
checkAndAddToParent, 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, setValueOrArrayAndAddToParent
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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBackgroundColorAsString, getBorderColorAsString, getBorderWidth, getHoverBackgroundColorAsString, getHoverBorderColorAsString, getHoverBorderWidth
protected 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 IsDefaultBar
true
, 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 IsDefaultBar
public void setBorderRadius(int borderRadius)
borderRadius
- the bar border radius (in pixels).public int getBorderRadius()
getBorderRadius
in interface IsDefaultBar
public void setHoverBorderRadius(int borderRadius)
borderRadius
- the bar border radius (in pixels) when hovered.public int getHoverBorderRadius()
getHoverBorderRadius
in interface IsDefaultBar
public void setPointStyle(PointStyle pointStyle)
pointStyle
- array of the style of the point.public PointStyle getPointStyle()
getPointStyle
in interface IsDefaultPointStyleHandler
null
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 IsDefaultPointStyleHandler
public Img getPointStyleAsImage()
null
.getPointStyleAsImage
in interface IsDefaultPointStyleHandler
null
.public void setPointStyle(Canvas pointStyle)
pointStyle
- canvas element of the style of the point as canvas.public Canvas getPointStyleAsCanvas()
null
.getPointStyleAsCanvas
in interface IsDefaultPointStyleHandler
null
.