public class BarDataset extends HoverFlexDataset implements HasDataPoints, HasBarDatasetOptions
Dataset.CanvasObjectProperty, Dataset.CommonProperty
Modifier and Type | Field and Description |
---|---|
static FloatingDataFactory |
FLOATING_BAR_DATA_FACTORY
Floating bars data factory to create
FloatingData s. |
DEFAULT_HIDDEN, DEFAULT_NORMALIZED, DEFAULT_PARSING
Modifier | Constructor and 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.
|
Modifier and Type | Method and 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, otherwise
null . |
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 |
getBorderRadiusCallback()
Returns the border radius callback, if set, otherwise
null . |
List<BorderSkipped> |
getBorderSkipped()
Returns the edges to skip drawing the border for.
|
BorderSkippedCallback |
getBorderSkippedCallback()
Returns the border skipped callback, if set, otherwise
null . |
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, otherwise
null . |
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, otherwise
null . |
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 |
getHoverBorderRadiusCallback()
Returns the border radius callback, if set, otherwise
null , 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, otherwise
null . |
IndexAxis |
getIndexAxis()
Returns the base axis for the data set.
|
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()
Returns an order option handler instance.
|
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, otherwise
null . |
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 of DefaultScaleId.X . |
ScaleId |
getYAxisID()
Returns the ID of the y axis to plot this data set on.
|
boolean |
isEnableBorderRadius()
If
true , it only shows the borderRadius of a bar when the bar is at the end of the stack. |
void |
setBase(BaseCallback baseCallback)
Sets the base callback.
|
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(NativeCallback baseCallback)
Sets the base callback.
|
void |
setBorderRadius(BarBorderRadius... borderRadius)
Sets the bar border radius (in pixels).
|
void |
setBorderRadius(BorderRadiusCallback borderRadiusCallback)
Sets the border radius 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(NativeCallback borderRadiusCallback)
Sets the border radius callback.
|
void |
setBorderSkipped(boolean borderskip)
Sets the edge to skip drawing the border for.
|
void |
setBorderSkipped(BorderSkipped... borderskips)
Sets the edges to skip drawing the border for.
|
void |
setBorderSkipped(BorderSkippedCallback borderSkippedCallback)
Sets the border skipped callback.
|
void |
setBorderSkipped(List<BorderSkipped> borderskips)
Sets the edges to skip drawing the border for.
|
void |
setBorderSkipped(NativeCallback borderSkippedCallback)
Sets the border skipped callback.
|
void |
setBorderWidth(BarBorderWidth... borderWidth)
Sets the stroke width of the bar in pixels.
|
void |
setBorderWidth(BarBorderWidthCallback borderWidthCallback)
Sets the border width callback.
|
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(NativeCallback borderWidthCallback)
Sets the border width callback.
|
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 |
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(FloatingData... floatingData)
Sets the data property of a data set for a chart is specified as an array of floating data.
|
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 |
setHoverBorderRadius(BarBorderRadius... borderRadius)
Sets the bar border radius (in pixels), when hovered.
|
void |
setHoverBorderRadius(BorderRadiusCallback hoverBorderRadiusCallback)
Sets the border radius callback, when hovered.
|
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(NativeCallback hoverBorderRadiusCallback)
Sets the border radius callback, when hovered.
|
void |
setHoverBorderWidth(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(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(NativeCallback hoverBorderWidthCallback)
Sets the hover border width callback.
|
void |
setIndexAxis(IndexAxis indexAxis)
Sets the base axis for the data set.
Use IndexAxis.Y for horizontal bar. |
default void |
setOrder(int order)
Sets the drawing order of dataset.
Also affects order for stacking, tooltip, and legend. |
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(NativeCallback pointStyleCallback)
Sets the point style callback.
|
void |
setPointStyle(PointStyle pointStyle)
Sets the style of the point for legend.
|
void |
setPointStyle(PointStyleCallback pointStyleCallback)
Sets the point style callback.
|
void |
setXAxisID(ScaleId xAxisID)
Sets the ID of the x axis to plot this data set on.
|
void |
setXAxisID(String xAxisID)
Sets the ID of the x axis to plot this data set on.
|
void |
setYAxisID(ScaleId yAxisID)
Sets the ID of the y axis to plot this data set on.
|
void |
setYAxisID(String yAxisID)
Sets the ID of the y axis to plot this data set on.
|
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
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
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
getDataPoints, getDataPoints, setDataPoints, setDataPoints
getDataset
getBarPercentage, getBarThickness, getCategoryPercentage, getMaxBarThickness, getMinBarLength, isGrouped, setBarPercentage, setBarThickness, setCategoryPercentage, setGrouped, setMaxBarThickness, setMinBarLength
getAnimation, getAnimations, getTransitions, isAnimationEnabled, setAnimationEnabled
extractScope
public static final FloatingDataFactory FLOATING_BAR_DATA_FACTORY
FloatingData
s.public BarDataset()
public BarDataset(boolean hidden)
hidden
- if true
, it will be initially hidden.public BarDataset(IsDefaultOptions defaultValues)
defaultValues
- default optionspublic BarDataset(IsDefaultOptions defaultValues, boolean hidden)
defaultValues
- default optionshidden
- if true
, it will be initially hidden.protected BarDataset(Type type, boolean hidden)
type
- chart type related to the data sethidden
- if true
, it will be initially hidden.protected BarDataset(Type type, IsDefaultOptions defaultValues, boolean hidden)
type
- chart type related to the data setdefaultValues
- default optionshidden
- if true
, it will be initially hidden.public final org.pepstock.charba.client.data.OrderHandler getOrderHandler()
public final BarDatasetOptionsHandler getDatasetOptionsHandler()
HasBarDatasetOptions
getDatasetOptionsHandler
in interface HasBarDatasetOptions
protected String getDefaultBackgroundColorAsString()
Dataset
getDefaultBackgroundColorAsString
in class Dataset
protected String getDefaultBorderColorAsString()
Dataset
getDefaultBorderColorAsString
in class Dataset
protected int getDefaultBorderWidth()
Dataset
getDefaultBorderWidth
in class Dataset
protected String getDefaultHoverBackgroundColorAsString()
Dataset
getDefaultHoverBackgroundColorAsString
in class Dataset
protected String getDefaultHoverBorderColorAsString()
Dataset
getDefaultHoverBorderColorAsString
in class Dataset
protected int getDefaultHoverBorderWidth()
Dataset
getDefaultHoverBorderWidth
in class Dataset
public void setBase(double... base)
base
- base value for the bar in data units along the value axis.public List<Double> getBase()
public String getLabel()
public void setXAxisID(String xAxisID)
xAxisID
- the ID of the x axis to plot this data set on.public void setXAxisID(ScaleId xAxisID)
xAxisID
- the ID of the x axis to plot this data set on.public ScaleId getXAxisID()
DefaultScaleId.X
.DefaultScaleId.X
public void setYAxisID(String yAxisID)
yAxisID
- the ID of the y axis to plot this data set on.public void setYAxisID(ScaleId yAxisID)
yAxisID
- the ID of the y axis to plot this data set on.public ScaleId getYAxisID()
DefaultScaleId.Y
.DefaultScaleId.Y
public void setIndexAxis(IndexAxis indexAxis)
IndexAxis.Y
for horizontal bar.indexAxis
- the base axis for the data setpublic IndexAxis getIndexAxis()
public void setBorderWidth(int... borderWidth)
setBorderWidth
in class HoverFlexDataset
borderWidth
- the stroke width of the bar in pixels.public void setBorderWidth(BarBorderWidth... borderWidth)
borderWidth
- the stroke width of the bar in pixels.public void setBorderWidth(List<BarBorderWidth> borderWidth)
borderWidth
- the stroke width of the bar in pixels.public List<Integer> getBorderWidth()
getBorderWidth
in class HoverFlexDataset
public List<BarBorderWidth> getBorderWidthAsObjects()
public void setHoverBorderWidth(int... borderWidth)
setHoverBorderWidth
in class HoverFlexDataset
borderWidth
- the stroke width of the elements when hovered.public void setHoverBorderWidth(BarBorderWidth... borderWidth)
borderWidth
- the stroke width of the bar in pixels, when hoveredpublic void setHoverBorderWidth(List<BarBorderWidth> borderWidth)
borderWidth
- the stroke width of the bar in pixels, when hoveredpublic List<Integer> getHoverBorderWidth()
getHoverBorderWidth
in class HoverFlexDataset
public List<BarBorderWidth> getHoverBorderWidthAsObjects()
public void setBorderSkipped(boolean borderskip)
borderskip
- to set false
as border skipped. If set true
, is ignoredpublic void setBorderSkipped(BorderSkipped... borderskips)
borderskips
- array of the edges to skip drawing the border for.public void setBorderSkipped(List<BorderSkipped> borderskips)
borderskips
- list of the edges to skip drawing the border for.public List<BorderSkipped> getBorderSkipped()
public void setBorderRadius(int... borderRadius)
borderRadius
- the bar border radius (in pixels).public void setBorderRadius(BarBorderRadius... borderRadius)
borderRadius
- the bar border radius (in pixels).public void setBorderRadius(List<BarBorderRadius> borderRadius)
borderRadius
- the bar border radius (in pixels).public List<Integer> getBorderRadius()
public List<BarBorderRadius> getBorderRadiusAsObjects()
public void setHoverBorderRadius(int... borderRadius)
borderRadius
- the bar border radius (in pixels), when hovered.public void setHoverBorderRadius(BarBorderRadius... borderRadius)
borderRadius
- Sets the bar border radius (in pixels), when hovered.public void setHoverBorderRadius(List<BarBorderRadius> borderRadius)
borderRadius
- Sets the bar border radius (in pixels), when hovered.public List<Integer> getHoverBorderRadius()
public List<BarBorderRadius> getHoverBorderRadiusAsObjects()
public List<FloatingData> getFloatingData()
DataType.ARRAYS
.public List<FloatingData> getFloatingData(boolean binding)
binding
- if true
binds the new array list in the containerDataType.ARRAYS
.public void setFloatingData(double[][] floatingData)
floatingData
- an array of arrays of doubles.public void setFloatingData(FloatingData... floatingData)
floatingData
- an array of floating datapublic void setFloatingData(List<FloatingData> floatingData)
floatingData
- an array of floating datapublic PointStyleType getPointStyleType()
public void setPointStyle(PointStyle pointStyle)
pointStyle
- the style of the point for legend.public PointStyle getPointStyle()
public void setPointStyle(Img pointStyle)
pointStyle
- the style of the point for legend as image.public Img getPointStyleAsImage()
public void setPointStyle(Canvas pointStyle)
pointStyle
- the style of the point for legend as canvas.public Canvas getPointStyleAsCanvas()
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.true
, it only shows the borderRadius of a bar when the bar is at the end of the stackpublic BarBorderWidthCallback getBorderWidthCallback()
null
.null
.public void setBorderWidth(BarBorderWidthCallback borderWidthCallback)
borderWidthCallback
- the border width callback to setpublic void setBorderWidth(NativeCallback borderWidthCallback)
borderWidthCallback
- the border width callback to setpublic BarBorderWidthCallback getHoverBorderWidthCallback()
null
.null
.public void setHoverBorderWidth(BarBorderWidthCallback hoverBorderWidthCallback)
hoverBorderWidthCallback
- the hover border width callback to setpublic void setHoverBorderWidth(NativeCallback hoverBorderWidthCallback)
hoverBorderWidthCallback
- the hover border width callback to setpublic BorderSkippedCallback getBorderSkippedCallback()
null
.null
.public void setBorderSkipped(BorderSkippedCallback borderSkippedCallback)
borderSkippedCallback
- the border skipped callback to setpublic void setBorderSkipped(NativeCallback borderSkippedCallback)
borderSkippedCallback
- the border skipped callback to setpublic BorderRadiusCallback getBorderRadiusCallback()
null
.null
.public void setBorderRadius(BorderRadiusCallback borderRadiusCallback)
borderRadiusCallback
- the border radius callback to setpublic void setBorderRadius(NativeCallback borderRadiusCallback)
borderRadiusCallback
- the border radius callback to setpublic BorderRadiusCallback getHoverBorderRadiusCallback()
null
, when hovered.null
, when hovered.public void setHoverBorderRadius(BorderRadiusCallback hoverBorderRadiusCallback)
hoverBorderRadiusCallback
- the border radius callback to setpublic void setHoverBorderRadius(NativeCallback hoverBorderRadiusCallback)
hoverBorderRadiusCallback
- the border radius callback to setpublic PointStyleCallback getPointStyleCallback()
null
.null
.public void setPointStyle(PointStyleCallback pointStyleCallback)
pointStyleCallback
- the point style callback.public void setPointStyle(NativeCallback pointStyleCallback)
pointStyleCallback
- the point style callback.public BaseCallback getBaseCallback()
null
.null
.public void setBase(BaseCallback baseCallback)
baseCallback
- the base callback.public void setBase(NativeCallback baseCallback)
baseCallback
- the base callback.public EnableBorderRadiusCallback getEnableBorderRadiusCallback()
null
.null
.public void setEnableBorderRadius(EnableBorderRadiusCallback enableBorderRadiusCallback)
enableBorderRadiusCallback
- the enable border radius callback.public void setEnableBorderRadius(NativeCallback enableBorderRadiusCallback)
enableBorderRadiusCallback
- the enable border radius callback.public void setOrder(int order)
order
- the drawing order of dataset.public int getOrder()