Class DefaultChartBar
- java.lang.Object
-
- org.pepstock.charba.client.defaults.chart.DefaultChartBar
-
- All Implemented Interfaces:
IsDefaultBar
,IsDefaultOptionsElement
,IsDefaultPointStyleHandler
public final class DefaultChartBar extends Object implements IsDefaultBar
Defaults for bar option element, based on chart type.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBackgroundColorAsString()
Returns the background color.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.String
getBorderColorAsString()
Returns the border color.int
getBorderRadius()
Returns the bar border radius (in pixels).BorderSkipped
getBorderSkipped()
Returns the edge to skip drawing the border for.int
getBorderWidth()
Returns the border width.String
getHoverBackgroundColorAsString()
Returns the background color when hovered.String
getHoverBorderColorAsString()
Returns the border color when hovered.int
getHoverBorderRadius()
Returns the bar border radius (in pixels) when hovered.int
getHoverBorderWidth()
Returns the border width when hovered.int
getInflateAmount()
Returns the amount of pixels to inflate the bar rectangles, when drawing.PointStyle
getPointStyle()
Returns the style of the point.Canvas
getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull
.Img
getPointStyleAsImage()
Returns the style of the point as image.
If property is missing or not an image, returnsnull
.PointStyleType
getPointStyleType()
Returns the type of point style.boolean
isAutoInflateAmount()
Returnstrue
if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.boolean
isEnableBorderRadius()
Iftrue
, it only shows the borderRadius of a bar when the bar is at the end of the stack.
-
-
-
Method Detail
-
getBackgroundColorAsString
public String getBackgroundColorAsString()
Description copied from interface:IsDefaultOptionsElement
Returns the background color.- Specified by:
getBackgroundColorAsString
in interfaceIsDefaultOptionsElement
- Returns:
- the background color.
-
getBorderWidth
public int getBorderWidth()
Description copied from interface:IsDefaultOptionsElement
Returns the border width.- Specified by:
getBorderWidth
in interfaceIsDefaultOptionsElement
- Returns:
- the border width.
-
getBorderColorAsString
public String getBorderColorAsString()
Description copied from interface:IsDefaultOptionsElement
Returns the border color.- Specified by:
getBorderColorAsString
in interfaceIsDefaultOptionsElement
- Returns:
- the border color.
-
getBorderSkipped
public BorderSkipped getBorderSkipped()
Description copied from interface:IsDefaultBar
Returns the edge to skip drawing the border for.- Specified by:
getBorderSkipped
in interfaceIsDefaultBar
- Returns:
- the edge to skip drawing the border for.
-
getBorderRadius
public int getBorderRadius()
Description copied from interface:IsDefaultBar
Returns the bar border radius (in pixels).- Specified by:
getBorderRadius
in interfaceIsDefaultBar
- Returns:
- the bar border radius (in pixels).
-
getPointStyle
public PointStyle getPointStyle()
Description copied from interface:IsDefaultPointStyleHandler
Returns the style of the point.- Specified by:
getPointStyle
in interfaceIsDefaultPointStyleHandler
- Returns:
- the style of the point.
-
getPointStyleType
public PointStyleType getPointStyleType()
Description copied from interface:IsDefaultPointStyleHandler
Returns the type of point style.- Specified by:
getPointStyleType
in interfaceIsDefaultPointStyleHandler
- Returns:
- the type of point style
-
getPointStyleAsCanvas
public Canvas getPointStyleAsCanvas()
Description copied from interface:IsDefaultPointStyleHandler
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull
.- Specified by:
getPointStyleAsCanvas
in interfaceIsDefaultPointStyleHandler
- Returns:
- image of the style of the point as canvas.
If property is missing or not a canvas, returnsnull
.
-
getPointStyleAsImage
public Img getPointStyleAsImage()
Description copied from interface:IsDefaultPointStyleHandler
Returns the style of the point as image.
If property is missing or not an image, returnsnull
.- Specified by:
getPointStyleAsImage
in interfaceIsDefaultPointStyleHandler
- Returns:
- image of the style of the point as image.
If property is missing or not a image, returnsnull
.
-
getHoverBackgroundColorAsString
public String getHoverBackgroundColorAsString()
Description copied from interface:IsDefaultOptionsElement
Returns the background color when hovered.- Specified by:
getHoverBackgroundColorAsString
in interfaceIsDefaultOptionsElement
- Returns:
- the background color when hovered.
-
getHoverBorderWidth
public int getHoverBorderWidth()
Description copied from interface:IsDefaultOptionsElement
Returns the border width when hovered.- Specified by:
getHoverBorderWidth
in interfaceIsDefaultOptionsElement
- Returns:
- the border width when hovered.
-
getHoverBorderColorAsString
public String getHoverBorderColorAsString()
Description copied from interface:IsDefaultOptionsElement
Returns the border color when hovered.- Specified by:
getHoverBorderColorAsString
in interfaceIsDefaultOptionsElement
- Returns:
- the border color when hovered.
-
getHoverBorderRadius
public int getHoverBorderRadius()
Description copied from interface:IsDefaultBar
Returns the bar border radius (in pixels) when hovered.- Specified by:
getHoverBorderRadius
in interfaceIsDefaultBar
- Returns:
- the bar border radius (in pixels) when hovered.
-
isEnableBorderRadius
public boolean isEnableBorderRadius()
Description copied from interface:IsDefaultBar
Iftrue
, it only shows the borderRadius of a bar when the bar is at the end of the stack.- Specified by:
isEnableBorderRadius
in interfaceIsDefaultBar
- Returns:
- if
true
, it only shows the borderRadius of a bar when the bar is at the end of the stack
-
isAutoInflateAmount
public boolean isAutoInflateAmount()
Description copied from interface:IsDefaultBar
Returnstrue
if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.- Specified by:
isAutoInflateAmount
in interfaceIsDefaultBar
- Returns:
true
if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated
-
getInflateAmount
public int getInflateAmount()
Description copied from interface:IsDefaultBar
Returns the amount of pixels to inflate the bar rectangles, when drawing.- Specified by:
getInflateAmount
in interfaceIsDefaultBar
- Returns:
- the amount of pixels to inflate the bar rectangles, when drawing
-
getBase
public double getBase()
Description copied from interface:IsDefaultBar
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:
getBase
in interfaceIsDefaultBar
- Returns:
- base value for the bar in data units along the value axis.
If not set, defaults to the value axis base value
-
-