Package org.pepstock.charba.client.data
Class BarDataset
-
- All Implemented Interfaces:
HasCallbackScope
,HasDataPoints
,HasDataset
,IsDefaultAnimationContainer
,IsDefaultAnimationTransition
,IsDefaultBarDatasets
,HasAnimationOptions
,HasBarDatasetOptions
- Direct Known Subclasses:
ChoroplethDataset
,HorizontalBarDataset
,StackedBarDataset
,TimeSeriesBarDataset
public class BarDataset extends HoverFlexDataset implements HasDataPoints, HasBarDatasetOptions
The bar chart allows a number of properties to be specified for each data set. These are used to set display properties for a specific data set.
Some properties can be specified as an array. If these are set to an array value, the first value applies to the first bar, the second value to the second bar, and so on.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.pepstock.charba.client.data.Dataset
Dataset.CanvasObjectProperty, Dataset.CommonProperty
-
-
Field Summary
Fields Modifier and Type Field Description static FloatingDataFactory
FLOATING_BAR_DATA_FACTORY
Floating bars data factory to createFloatingData
s.-
Fields inherited from class org.pepstock.charba.client.data.Dataset
DEFAULT_HIDDEN, DEFAULT_NORMALIZED, DEFAULT_PARSING
-
-
Constructor Summary
Constructors Modifier Constructor Description BarDataset()
Creates a data set.
It uses the global options has default.BarDataset(boolean hidden)
Creates a data set.
It uses the global options has default.BarDataset(IsDefaultOptions defaultValues)
Creates the data set using a default.BarDataset(IsDefaultOptions defaultValues, boolean hidden)
Creates the data set using a default.protected
BarDataset(Type type, boolean hidden)
Creates the data set using chart type related to the data set.protected
BarDataset(Type type, IsDefaultOptions defaultValues, boolean hidden)
Creates the data set using a default and chart type related to the data set.
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description List<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.BaseCallback
getBaseCallback()
Returns the base callback, if set, otherwisenull
.List<Integer>
getBorderRadius()
Returns the list of bar border radius (in pixels).
If a callback has been set, returns an empty list.List<BarBorderRadius>
getBorderRadiusAsObjects()
Returns the list of bar border radius (in pixels).
If a callback or an array have been set, returns an empty object.BorderRadiusCallback<DatasetContext>
getBorderRadiusCallback()
Returns the border radius callback, if set, otherwisenull
.List<BorderSkipped>
getBorderSkipped()
Returns the edges to skip drawing the border for.BorderSkippedCallback
getBorderSkippedCallback()
Returns the border skipped callback, if set, otherwisenull
.List<Integer>
getBorderWidth()
Returns the stroke width of the bar in pixels.
If a callback has been set, returns an empty list.List<BarBorderWidth>
getBorderWidthAsObjects()
Returns the stroke width of the bar in pixels.
If a callback or an array have been set, returns an empty object.BarBorderWidthCallback
getBorderWidthCallback()
Returns the border width callback, if set, otherwisenull
.BarDatasetOptionsHandler
getDatasetOptionsHandler()
Returns the instance of bar dataset options handler.protected String
getDefaultBackgroundColorAsString()
Returns the default background color value based on type of chart.protected String
getDefaultBorderColorAsString()
Returns the default border color value based on type of chart.protected int
getDefaultBorderWidth()
Returns the default border width value based on type of chart.protected String
getDefaultHoverBackgroundColorAsString()
Returns the default background color value based on type of chart.protected String
getDefaultHoverBorderColorAsString()
Returns the default border color value based on type of chart.protected int
getDefaultHoverBorderWidth()
Returns the default border width value based on type of chart.EnableBorderRadiusCallback
getEnableBorderRadiusCallback()
Returns the enable border radius callback, if set, otherwisenull
.List<FloatingData>
getFloatingData()
Returns the data property of a data set for a chart is specified as an array of floating data.List<FloatingData>
getFloatingData(boolean binding)
Returns the data property of a data set for a chart is specified as an array of floating data.List<Integer>
getHoverBorderRadius()
Returns the list of bar border radius (in pixels), when hovered.List<BarBorderRadius>
getHoverBorderRadiusAsObjects()
Returns the list of bar border radius (in pixels), when hovered.BorderRadiusCallback<DatasetContext>
getHoverBorderRadiusCallback()
Returns the border radius callback, if set, otherwisenull
, when hovered.List<Integer>
getHoverBorderWidth()
Returns the stroke width of the elements when hovered.List<BarBorderWidth>
getHoverBorderWidthAsObjects()
Returns the stroke width of the bar in pixels, when hovered.BarBorderWidthCallback
getHoverBorderWidthCallback()
Returns the hover border width callback, if set, otherwisenull
.IndexAxis
getIndexAxis()
Returns the base axis for the data set.List<Integer>
getInflateAmount()
Returns the amount of pixels to inflate the bar rectangles, when drawing.InflateAmountCallback
getInflateAmountCallback()
Returns the inflate amount callback, if set, otherwisenull
.String
getLabel()
Returns the label for the data set which appears in the legend and tooltips.default int
getOrder()
Returns the drawing order of dataset.
Also affects order for stacking, tooltip, and legend.org.pepstock.charba.client.data.OrderHandler
getOrderHandler()
PointStyle
getPointStyle()
Returns the style of the point for legend.Canvas
getPointStyleAsCanvas()
Returns the style of the point for legend as canvas.Img
getPointStyleAsImage()
Returns the style of the point for legend as image.PointStyleCallback
getPointStyleCallback()
Returns the point style callback, if set, otherwisenull
.PointStyleType
getPointStyleType()
Returns the type of point style.ScaleId
getXAxisID()
Returns the ID of the x axis to plot this data set on.
If not specified, this defaults to the ID ofDefaultScaleId.X
.ScaleId
getYAxisID()
Returns the ID of the y axis to plot this data set on.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.void
setAutoInflateAmount(boolean autoInflateAmount)
Setstrue
if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.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.void
setBase(BaseCallback baseCallback)
Sets the base callback.void
setBase(NativeCallback baseCallback)
Sets the base callback.void
setBorderRadius(int... borderRadius)
Sets the bar border radius (in pixels).void
setBorderRadius(List<BarBorderRadius> borderRadius)
Sets the bar border radius (in pixels).void
setBorderRadius(BorderRadiusCallback<DatasetContext> borderRadiusCallback)
Sets the border radius callback.void
setBorderRadius(NativeCallback borderRadiusCallback)
Sets the border radius callback.void
setBorderRadius(BarBorderRadius... borderRadius)
Sets the bar border radius (in pixels).void
setBorderSkipped(boolean borderskip)
Sets the edge to skip drawing the border for.void
setBorderSkipped(List<BorderSkipped> borderskips)
Sets the edges to skip drawing the border for.void
setBorderSkipped(BorderSkippedCallback borderSkippedCallback)
Sets the border skipped callback.void
setBorderSkipped(NativeCallback borderSkippedCallback)
Sets the border skipped callback.void
setBorderSkipped(BorderSkipped... borderskips)
Sets the edges to skip drawing the border for.void
setBorderWidth(int... borderWidth)
Sets the stroke width of the bar in pixels.void
setBorderWidth(List<BarBorderWidth> borderWidth)
Sets the stroke width of the bar in pixels.void
setBorderWidth(BarBorderWidthCallback borderWidthCallback)
Sets the border width callback.void
setBorderWidth(NativeCallback borderWidthCallback)
Sets the border width callback.void
setBorderWidth(BarBorderWidth... borderWidth)
Sets the stroke width of the bar in pixels.void
setEnableBorderRadius(boolean enableBorderRadius)
Iftrue
, it only shows the borderRadius of a bar when the bar is at the end of the stack.void
setEnableBorderRadius(EnableBorderRadiusCallback enableBorderRadiusCallback)
Sets the enable border radius callback.void
setEnableBorderRadius(NativeCallback enableBorderRadiusCallback)
Sets the enable border radius callback.void
setFloatingData(double[][] floatingData)
Sets the data property of a data set for a chart is specified as an array of arrays of doubles.void
setFloatingData(List<FloatingData> floatingData)
Sets the data property of a data set for a chart is specified as an array of floating data.void
setFloatingData(FloatingData... floatingData)
Sets the data property of a data set for a chart is specified as an array of floating data.void
setHoverBorderRadius(int... borderRadius)
Sets the bar border radius (in pixels), when hovered.void
setHoverBorderRadius(List<BarBorderRadius> borderRadius)
Sets Sets the bar border radius (in pixels), when hovered.void
setHoverBorderRadius(BorderRadiusCallback<DatasetContext> hoverBorderRadiusCallback)
Sets the border radius callback, when hovered.void
setHoverBorderRadius(NativeCallback hoverBorderRadiusCallback)
Sets the border radius callback, when hovered.void
setHoverBorderRadius(BarBorderRadius... borderRadius)
Sets the bar border radius (in pixels), when hovered.void
setHoverBorderWidth(int... borderWidth)
Sets the stroke width of the elements when hovered.void
setHoverBorderWidth(List<BarBorderWidth> borderWidth)
Sets the stroke width of the bar in pixels, when hovered.void
setHoverBorderWidth(BarBorderWidthCallback hoverBorderWidthCallback)
Sets the hover border width callback.void
setHoverBorderWidth(NativeCallback hoverBorderWidthCallback)
Sets the hover border width callback.void
setHoverBorderWidth(BarBorderWidth... borderWidth)
Sets the stroke width of the bar in pixels, when hovered.void
setIndexAxis(IndexAxis indexAxis)
Sets the base axis for the data set.
UseIndexAxis.Y
for horizontal bar.void
setInflateAmount(int... inflateAmount)
Sets the amount of pixels to inflate the bar rectangles, when drawing.void
setInflateAmount(InflateAmountCallback inflateAmountCallback)
Sets the inflate amount callback.void
setInflateAmount(NativeCallback inflateAmountCallback)
Sets the inflate amount callback.default void
setOrder(int order)
Sets the drawing order of dataset.
Also affects order for stacking, tooltip, and legend.void
setPointStyle(NativeCallback pointStyleCallback)
Sets the point style callback.void
setPointStyle(PointStyleCallback pointStyleCallback)
Sets the point style callback.void
setPointStyle(Canvas pointStyle)
Sets the style of the point for legend as canvas.void
setPointStyle(Img pointStyle)
Sets the style of the point for legend as image.void
setPointStyle(PointStyle pointStyle)
Sets the style of the point for legend.void
setXAxisID(String xAxisID)
Sets the ID of the x axis to plot this data set on.void
setXAxisID(ScaleId xAxisID)
Sets the ID of the x axis to plot this data set on.void
setYAxisID(String yAxisID)
Sets the ID of the y axis to plot this data set on.void
setYAxisID(ScaleId yAxisID)
Sets the ID of the y axis to plot this data set on.-
Methods inherited from class org.pepstock.charba.client.data.HoverFlexDataset
getBackgroundColor, getBackgroundColorAsGradient, getBackgroundColorAsPatterns, getBackgroundColorAsString, getBorderColor, getBorderColorAsGradient, getBorderColorAsString, getColors, getHoverBackgroundColor, getHoverBackgroundColorAsGradient, getHoverBackgroundColorAsPatterns, getHoverBackgroundColorAsString, getHoverBorderColor, getHoverBorderColorAsGradient, getHoverBorderColorAsString, getWidths, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderColor, setColors, setColors, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderColor, setWidths
-
Methods inherited from class org.pepstock.charba.client.data.Dataset
createContext, getAnimationContainer, getBackgroundColorCallback, getBorderColorCallback, getClip, getClipAsObject, getData, getData, getDataCount, getDataset, getDataType, getDefaultValues, getHoverBackgroundColorCallback, getHoverBorderColorCallback, getId, getOptions, getOptions, getScope, getType, getTypedDataset, hasOptions, invokeColorCallback, isClip, isHidden, isNormalized, isParsing, removeOptions, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setClip, setClip, setClip, setData, setData, setHidden, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setLabel, setNormalized, setOptions, setOptions, setParsing
-
Methods inherited from class org.pepstock.charba.client.commons.AbstractNode
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
-
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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.options.HasAnimationOptions
getAnimation, getAnimations, getTransitions, isAnimationEnabled, setAnimationEnabled
-
Methods inherited from interface org.pepstock.charba.client.options.HasBarDatasetOptions
getBarPercentage, getBarThickness, getCategoryPercentage, getMaxBarThickness, getMinBarLength, isGrouped, setBarPercentage, setBarThickness, setCategoryPercentage, setGrouped, setMaxBarThickness, setMinBarLength
-
Methods inherited from interface org.pepstock.charba.client.data.HasDataPoints
getDataPoints, getDataPoints, setDataPoints, setDataPoints
-
Methods inherited from interface org.pepstock.charba.client.data.HasDataset
getDataset
-
-
-
-
Field Detail
-
FLOATING_BAR_DATA_FACTORY
public static final FloatingDataFactory FLOATING_BAR_DATA_FACTORY
Floating bars data factory to createFloatingData
s.
-
-
Constructor Detail
-
BarDataset
public BarDataset()
Creates a data set.
It uses the global options has default.
-
BarDataset
public BarDataset(boolean hidden)
Creates a data set.
It uses the global options has default.- Parameters:
hidden
- iftrue
, it will be initially hidden.
-
BarDataset
public BarDataset(IsDefaultOptions defaultValues)
Creates the data set using a default.- Parameters:
defaultValues
- default options
-
BarDataset
public BarDataset(IsDefaultOptions defaultValues, boolean hidden)
Creates the data set using a default.- Parameters:
defaultValues
- default optionshidden
- iftrue
, it will be initially hidden.
-
BarDataset
protected BarDataset(Type type, boolean hidden)
Creates the data set using chart type related to the data set.- Parameters:
type
- chart type related to the data sethidden
- iftrue
, it will be initially hidden.
-
BarDataset
protected BarDataset(Type type, IsDefaultOptions defaultValues, boolean hidden)
Creates the data set using a default and chart type related to the data set.- Parameters:
type
- chart type related to the data setdefaultValues
- default optionshidden
- iftrue
, it will be initially hidden.
-
-
Method Detail
-
getOrderHandler
public final org.pepstock.charba.client.data.OrderHandler getOrderHandler()
-
getDatasetOptionsHandler
public final BarDatasetOptionsHandler getDatasetOptionsHandler()
Description copied from interface:HasBarDatasetOptions
Returns the instance of bar dataset options handler.- Specified by:
getDatasetOptionsHandler
in interfaceHasBarDatasetOptions
- Returns:
- the instance of bar dataset options handler
-
getDefaultBackgroundColorAsString
protected String getDefaultBackgroundColorAsString()
Description copied from class:Dataset
Returns the default background color value based on type of chart.- Overrides:
getDefaultBackgroundColorAsString
in classDataset
- Returns:
- the default background color value based on type of chart.
-
getDefaultBorderColorAsString
protected String getDefaultBorderColorAsString()
Description copied from class:Dataset
Returns the default border color value based on type of chart.- Overrides:
getDefaultBorderColorAsString
in classDataset
- Returns:
- the default border color value based on type of chart.
-
getDefaultBorderWidth
protected int getDefaultBorderWidth()
Description copied from class:Dataset
Returns the default border width value based on type of chart.- Overrides:
getDefaultBorderWidth
in classDataset
- Returns:
- the default border width value based on type of chart.
-
getDefaultHoverBackgroundColorAsString
protected String getDefaultHoverBackgroundColorAsString()
Description copied from class:Dataset
Returns the default background color value based on type of chart.- Overrides:
getDefaultHoverBackgroundColorAsString
in classDataset
- Returns:
- the default background color value based on type of chart.
-
getDefaultHoverBorderColorAsString
protected String getDefaultHoverBorderColorAsString()
Description copied from class:Dataset
Returns the default border color value based on type of chart.- Overrides:
getDefaultHoverBorderColorAsString
in classDataset
- Returns:
- the default border color value based on type of chart.
-
getDefaultHoverBorderWidth
protected int getDefaultHoverBorderWidth()
Description copied from class:Dataset
Returns the default border width value based on type of chart.- Overrides:
getDefaultHoverBorderWidth
in classDataset
- Returns:
- the default border width value based on type of chart.
-
setBase
public 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
-
getBase
public List<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.- Returns:
- base value for the bar in data units along the value axis.
If not set, defaults to the value axis base value
-
getLabel
public String getLabel()
Returns the label for the data set which appears in the legend and tooltips.
-
setXAxisID
public void setXAxisID(String xAxisID)
Sets the ID of the x axis to plot this data set on.- Parameters:
xAxisID
- the ID of the x axis to plot this data set on.
-
setXAxisID
public void setXAxisID(ScaleId xAxisID)
Sets the ID of the x axis to plot this data set on.- Parameters:
xAxisID
- the ID of the x axis to plot this data set on.
-
getXAxisID
public ScaleId getXAxisID()
Returns the ID of the x axis to plot this data set on.
If not specified, this defaults to the ID ofDefaultScaleId.X
.- Returns:
- the ID of the x axis to plot this data set on.
If not specified, this defaults to the ID ofDefaultScaleId.X
-
setYAxisID
public void setYAxisID(String yAxisID)
Sets the ID of the y axis to plot this data set on.- Parameters:
yAxisID
- the ID of the y axis to plot this data set on.
-
setYAxisID
public void setYAxisID(ScaleId yAxisID)
Sets the ID of the y axis to plot this data set on.- Parameters:
yAxisID
- the ID of the y axis to plot this data set on.
-
getYAxisID
public ScaleId getYAxisID()
Returns the ID of the y axis to plot this data set on.
If not specified, this defaults to the ID ofDefaultScaleId.Y
.- Returns:
- the ID of the y axis to plot this data set on.
If not specified, this defaults to the ID ofDefaultScaleId.Y
-
setIndexAxis
public void setIndexAxis(IndexAxis indexAxis)
Sets the base axis for the data set.
UseIndexAxis.Y
for horizontal bar.- Parameters:
indexAxis
- the base axis for the data set
-
getIndexAxis
public IndexAxis getIndexAxis()
Returns the base axis for the data set.- Returns:
- the base axis for the data set
-
setBorderWidth
public void setBorderWidth(int... borderWidth)
Sets the stroke width of the bar in pixels.- Overrides:
setBorderWidth
in classHoverFlexDataset
- Parameters:
borderWidth
- the stroke width of the bar in pixels.
-
setBorderWidth
public void setBorderWidth(BarBorderWidth... borderWidth)
Sets the stroke width of the bar in pixels.- Parameters:
borderWidth
- the stroke width of the bar in pixels.
-
setBorderWidth
public void setBorderWidth(List<BarBorderWidth> borderWidth)
Sets the stroke width of the bar in pixels.- Parameters:
borderWidth
- the stroke width of the bar in pixels.
-
getBorderWidth
public List<Integer> getBorderWidth()
Returns the stroke width of the bar in pixels.
If a callback has been set, returns an empty list.- Overrides:
getBorderWidth
in classHoverFlexDataset
- Returns:
- list of the stroke width of the bar in pixels.
If a callback has been set, returns an empty list.
-
getBorderWidthAsObjects
public List<BarBorderWidth> getBorderWidthAsObjects()
Returns the stroke width of the bar in pixels.
If a callback or an array have been set, returns an empty object.- Returns:
- list of the stroke width of the bar in pixels.
If a callback or an array have been set, returns an empty object
-
setHoverBorderWidth
public void setHoverBorderWidth(int... borderWidth)
Sets the stroke width of the elements when hovered.- Overrides:
setHoverBorderWidth
in classHoverFlexDataset
- Parameters:
borderWidth
- the stroke width of the elements when hovered.
-
setHoverBorderWidth
public void setHoverBorderWidth(BarBorderWidth... borderWidth)
Sets the stroke width of the bar in pixels, when hovered.- Parameters:
borderWidth
- the stroke width of the bar in pixels, when hovered
-
setHoverBorderWidth
public void setHoverBorderWidth(List<BarBorderWidth> borderWidth)
Sets the stroke width of the bar in pixels, when hovered.- Parameters:
borderWidth
- the stroke width of the bar in pixels, when hovered
-
getHoverBorderWidth
public List<Integer> getHoverBorderWidth()
Returns the stroke width of the elements when hovered.- Overrides:
getHoverBorderWidth
in classHoverFlexDataset
- Returns:
- list of the stroke width of the elements when hovered.
-
getHoverBorderWidthAsObjects
public List<BarBorderWidth> getHoverBorderWidthAsObjects()
Returns the stroke width of the bar in pixels, when hovered.- Returns:
- list of the stroke width of the bar in pixels, when hovered
-
setBorderSkipped
public void setBorderSkipped(boolean borderskip)
Sets the edge to skip drawing the border for.- Parameters:
borderskip
- to setfalse
as border skipped. If settrue
, is ignored
-
setBorderSkipped
public void setBorderSkipped(BorderSkipped... borderskips)
Sets the edges to skip drawing the border for.- Parameters:
borderskips
- array of the edges to skip drawing the border for.
-
setBorderSkipped
public void setBorderSkipped(List<BorderSkipped> borderskips)
Sets the edges to skip drawing the border for.- Parameters:
borderskips
- list of the edges to skip drawing the border for.
-
getBorderSkipped
public List<BorderSkipped> getBorderSkipped()
Returns the edges to skip drawing the border for.- Returns:
- the edges to skip drawing the border for.
-
setBorderRadius
public void setBorderRadius(int... borderRadius)
Sets the bar border radius (in pixels).- Parameters:
borderRadius
- the bar border radius (in pixels).
-
setBorderRadius
public void setBorderRadius(BarBorderRadius... borderRadius)
Sets the bar border radius (in pixels).- Parameters:
borderRadius
- the bar border radius (in pixels).
-
setBorderRadius
public void setBorderRadius(List<BarBorderRadius> borderRadius)
Sets the bar border radius (in pixels).- Parameters:
borderRadius
- the bar border radius (in pixels).
-
getBorderRadius
public List<Integer> getBorderRadius()
Returns the list of bar border radius (in pixels).
If a callback has been set, returns an empty list.- Returns:
- the list of bar border radius (in pixels).
If a callback has been set, returns an empty list
-
getBorderRadiusAsObjects
public List<BarBorderRadius> getBorderRadiusAsObjects()
Returns the list of bar border radius (in pixels).
If a callback or an array have been set, returns an empty object.- Returns:
- the list of bar border radius (in pixels).
If a callback or an array have been set, returns an empty object
-
setHoverBorderRadius
public void setHoverBorderRadius(int... borderRadius)
Sets the bar border radius (in pixels), when hovered.- Parameters:
borderRadius
- the bar border radius (in pixels), when hovered.
-
setHoverBorderRadius
public void setHoverBorderRadius(BarBorderRadius... borderRadius)
Sets the bar border radius (in pixels), when hovered.- Parameters:
borderRadius
- Sets the bar border radius (in pixels), when hovered.
-
setHoverBorderRadius
public void setHoverBorderRadius(List<BarBorderRadius> borderRadius)
Sets Sets the bar border radius (in pixels), when hovered.- Parameters:
borderRadius
- Sets the bar border radius (in pixels), when hovered.
-
getHoverBorderRadius
public List<Integer> getHoverBorderRadius()
Returns the list of bar border radius (in pixels), when hovered.- Returns:
- the list of bar border radius (in pixels), when hovered.
-
getHoverBorderRadiusAsObjects
public List<BarBorderRadius> getHoverBorderRadiusAsObjects()
Returns the list of bar border radius (in pixels), when hovered.- Returns:
- the list of bar border radius (in pixels), when hovered.
-
getFloatingData
public List<FloatingData> getFloatingData()
Returns the data property of a data set for a chart is specified as an array of floating data.- Returns:
- a list of floating data or an empty list if the data type is not
DataType.ARRAYS
.
-
getFloatingData
public List<FloatingData> getFloatingData(boolean binding)
Returns the data property of a data set for a chart is specified as an array of floating data.- Parameters:
binding
- iftrue
binds the new array list in the container- Returns:
- a list of floating data or an empty list if the data type is not
DataType.ARRAYS
.
-
setFloatingData
public void setFloatingData(double[][] floatingData)
Sets the data property of a data set for a chart is specified as an array of arrays of doubles.- Parameters:
floatingData
- an array of arrays of doubles.
-
setFloatingData
public void setFloatingData(FloatingData... floatingData)
Sets the data property of a data set for a chart is specified as an array of floating data.- Parameters:
floatingData
- an array of floating data
-
setFloatingData
public void setFloatingData(List<FloatingData> floatingData)
Sets the data property of a data set for a chart is specified as an array of floating data.- Parameters:
floatingData
- an array of floating data
-
getPointStyleType
public PointStyleType getPointStyleType()
Returns the type of point style.- Returns:
- the type of point style
-
setPointStyle
public void setPointStyle(PointStyle pointStyle)
Sets the style of the point for legend.- Parameters:
pointStyle
- the style of the point for legend.
-
getPointStyle
public PointStyle getPointStyle()
Returns the style of the point for legend.- Returns:
- the style of the point for legend.
-
setPointStyle
public void setPointStyle(Img pointStyle)
Sets the style of the point for legend as image.- Parameters:
pointStyle
- the style of the point for legend as image.
-
getPointStyleAsImage
public Img getPointStyleAsImage()
Returns the style of the point for legend as image.- Returns:
- the style of the point for legend as image.
-
setPointStyle
public void setPointStyle(Canvas pointStyle)
Sets the style of the point for legend as canvas.- Parameters:
pointStyle
- the style of the point for legend as canvas.
-
getPointStyleAsCanvas
public Canvas getPointStyleAsCanvas()
Returns the style of the point for legend as canvas.- Returns:
- the style of the point for legend as canvas.
-
setEnableBorderRadius
public 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
- iftrue
, it only shows the borderRadius of a bar when the bar is at the end of the stack
-
isEnableBorderRadius
public boolean isEnableBorderRadius()
Iftrue
, it only shows the borderRadius of a bar when the bar is at the end of the stack.- Returns:
- if
true
, it only shows the borderRadius of a bar when the bar is at the end of the stack
-
setAutoInflateAmount
public void setAutoInflateAmount(boolean autoInflateAmount)
Setstrue
if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.- Parameters:
autoInflateAmount
-true
if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated
-
isAutoInflateAmount
public boolean isAutoInflateAmount()
Returnstrue
if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated.- Returns:
true
if the amount of pixels to inflate the bar rectangles, when drawing, is automatically calculated
-
setInflateAmount
public 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
-
getInflateAmount
public List<Integer> getInflateAmount()
Returns the amount of pixels to inflate the bar rectangles, when drawing.- Returns:
- the amount of pixels to inflate the bar rectangles, when drawing
-
getBorderWidthCallback
public BarBorderWidthCallback getBorderWidthCallback()
Returns the border width callback, if set, otherwisenull
.- Returns:
- the border width callback, if set, otherwise
null
.
-
setBorderWidth
public void setBorderWidth(BarBorderWidthCallback borderWidthCallback)
Sets the border width callback.- Parameters:
borderWidthCallback
- the border width callback to set
-
setBorderWidth
public void setBorderWidth(NativeCallback borderWidthCallback)
Sets the border width callback.- Parameters:
borderWidthCallback
- the border width callback to set
-
getHoverBorderWidthCallback
public BarBorderWidthCallback getHoverBorderWidthCallback()
Returns the hover border width callback, if set, otherwisenull
.- Returns:
- the hover border width callback, if set, otherwise
null
.
-
setHoverBorderWidth
public void setHoverBorderWidth(BarBorderWidthCallback hoverBorderWidthCallback)
Sets the hover border width callback.- Parameters:
hoverBorderWidthCallback
- the hover border width callback to set
-
setHoverBorderWidth
public void setHoverBorderWidth(NativeCallback hoverBorderWidthCallback)
Sets the hover border width callback.- Parameters:
hoverBorderWidthCallback
- the hover border width callback to set
-
getBorderSkippedCallback
public BorderSkippedCallback getBorderSkippedCallback()
Returns the border skipped callback, if set, otherwisenull
.- Returns:
- the border skipped callback, if set, otherwise
null
.
-
setBorderSkipped
public void setBorderSkipped(BorderSkippedCallback borderSkippedCallback)
Sets the border skipped callback.- Parameters:
borderSkippedCallback
- the border skipped callback to set
-
setBorderSkipped
public void setBorderSkipped(NativeCallback borderSkippedCallback)
Sets the border skipped callback.- Parameters:
borderSkippedCallback
- the border skipped callback to set
-
getBorderRadiusCallback
public BorderRadiusCallback<DatasetContext> getBorderRadiusCallback()
Returns the border radius callback, if set, otherwisenull
.- Returns:
- the border radius callback, if set, otherwise
null
.
-
setBorderRadius
public void setBorderRadius(BorderRadiusCallback<DatasetContext> borderRadiusCallback)
Sets the border radius callback.- Parameters:
borderRadiusCallback
- the border radius callback to set
-
setBorderRadius
public void setBorderRadius(NativeCallback borderRadiusCallback)
Sets the border radius callback.- Parameters:
borderRadiusCallback
- the border radius callback to set
-
getHoverBorderRadiusCallback
public BorderRadiusCallback<DatasetContext> getHoverBorderRadiusCallback()
Returns the border radius callback, if set, otherwisenull
, when hovered.- Returns:
- the border radius callback, if set, otherwise
null
, when hovered.
-
setHoverBorderRadius
public void setHoverBorderRadius(BorderRadiusCallback<DatasetContext> hoverBorderRadiusCallback)
Sets the border radius callback, when hovered.- Parameters:
hoverBorderRadiusCallback
- the border radius callback to set
-
setHoverBorderRadius
public void setHoverBorderRadius(NativeCallback hoverBorderRadiusCallback)
Sets the border radius callback, when hovered.- Parameters:
hoverBorderRadiusCallback
- the border radius callback to set
-
getPointStyleCallback
public PointStyleCallback getPointStyleCallback()
Returns the point style callback, if set, otherwisenull
.- Returns:
- the point style callback, if set, otherwise
null
.
-
setPointStyle
public void setPointStyle(PointStyleCallback pointStyleCallback)
Sets the point style callback.- Parameters:
pointStyleCallback
- the point style callback.
-
setPointStyle
public void setPointStyle(NativeCallback pointStyleCallback)
Sets the point style callback.- Parameters:
pointStyleCallback
- the point style callback.
-
getBaseCallback
public BaseCallback getBaseCallback()
Returns the base callback, if set, otherwisenull
.- Returns:
- the base callback, if set, otherwise
null
.
-
setBase
public void setBase(BaseCallback baseCallback)
Sets the base callback.- Parameters:
baseCallback
- the base callback.
-
setBase
public void setBase(NativeCallback baseCallback)
Sets the base callback.- Parameters:
baseCallback
- the base callback.
-
getEnableBorderRadiusCallback
public EnableBorderRadiusCallback getEnableBorderRadiusCallback()
Returns the enable border radius callback, if set, otherwisenull
.- Returns:
- the enable border radius callback, if set, otherwise
null
.
-
setEnableBorderRadius
public void setEnableBorderRadius(EnableBorderRadiusCallback enableBorderRadiusCallback)
Sets the enable border radius callback.- Parameters:
enableBorderRadiusCallback
- the enable border radius callback.
-
setEnableBorderRadius
public void setEnableBorderRadius(NativeCallback enableBorderRadiusCallback)
Sets the enable border radius callback.- Parameters:
enableBorderRadiusCallback
- the enable border radius callback.
-
getInflateAmountCallback
public InflateAmountCallback getInflateAmountCallback()
Returns the inflate amount callback, if set, otherwisenull
.- Returns:
- the inflate amount callback, if set, otherwise
null
.
-
setInflateAmount
public void setInflateAmount(InflateAmountCallback inflateAmountCallback)
Sets the inflate amount callback.- Parameters:
inflateAmountCallback
- the inflate amount callback.
-
setInflateAmount
public void setInflateAmount(NativeCallback inflateAmountCallback)
Sets the inflate amount callback.- Parameters:
inflateAmountCallback
- the inflate amount callback.
-
setOrder
public default void setOrder(int order)
Sets the drawing order of dataset.
Also affects order for stacking, tooltip, and legend.- Parameters:
order
- the drawing order of dataset.
-
getOrder
public default int getOrder()
Returns the drawing order of dataset.
Also affects order for stacking, tooltip, and legend.- Returns:
- the drawing order of dataset
-
-