Package org.pepstock.charba.client.data
Class HoverDataset
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.data.Dataset
-
- org.pepstock.charba.client.data.HoverFlexDataset
-
- org.pepstock.charba.client.data.HoverDataset
-
- All Implemented Interfaces:
HasCallbackScope
,HasDataset
,IsDefaultAnimationContainer
,IsDefaultAnimationTransition
,HasAnimationOptions
- Direct Known Subclasses:
BubbleDataset
,PieDataset
,PolarAreaDataset
public abstract class HoverDataset extends HoverFlexDataset
The 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.- 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 inherited from class org.pepstock.charba.client.data.Dataset
DEFAULT_HIDDEN, DEFAULT_NORMALIZED, DEFAULT_PARSING
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HoverDataset(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 Modifier and Type Method Description WidthCallback<DatasetContext>
getBorderWidthCallback()
Returns the border width callback, if set, otherwisenull
.protected ArrayString
getColors(Key key, String defaultvalue)
Returns an array of colors as string.List<Gradient>
getHoverBackgroundColorAsGradient()
Returns the fill gradients of the arcs in the data set when hovered.
If property is missing or not a gradient, returns an empty list.List<Pattern>
getHoverBackgroundColorAsPatterns()
Returns the fill patterns of the arcs in the data set when hovered.
If property is missing or not a pattern, returns an empty list.List<String>
getHoverBackgroundColorAsString()
Returns the fill color of the arcs when hovered as string.
If property is missing or not a color, returns an empty list.List<Gradient>
getHoverBorderColorAsGradient()
Returns the stroke gradients of the arcs in the data set when hovered.
If property is missing or not a pattern, returns an empty list.List<String>
getHoverBorderColorAsString()
Returns the stroke color of the arcs when hovered.WidthCallback<DatasetContext>
getHoverBorderWidthCallback()
Returns the hover border width callback, if set, otherwisenull
.protected ArrayInteger
getWidths(Key key, int defaultvalue)
Returns an array of widths as integervoid
setBorderWidth(NativeCallback borderWidthCallback)
Sets the border width callback.void
setBorderWidth(WidthCallback<DatasetContext> borderWidthCallback)
Sets the border width callback.protected void
setColors(Key key, String... colors)
Sets a color property in the dataset, setting a single value or an array.protected void
setColors(Key key, IsColor... colors)
Sets a color property in the dataset, setting a single value or an array.void
setHoverBackgroundColor(String... colors)
Sets the fill color of the arcs when hovered as string.void
setHoverBackgroundColor(Gradient... colors)
Sets the fill gradient of the arcs in the data set when hovered.void
setHoverBackgroundColor(IsColor... colors)
Sets the fill color of the arcs when hovered.void
setHoverBackgroundColor(Pattern... colors)
Sets the fill pattern of the arcs in the data set when hovered.void
setHoverBorderColor(String... colors)
Sets the stroke color of the arcs when hovered as string.void
setHoverBorderColor(Gradient... colors)
Sets the stroke gradient of the arcs in the data set when hovered as gradient.void
setHoverBorderColor(IsColor... colors)
Sets the stroke color of the arcs when hovered as string.void
setHoverBorderWidth(WidthCallback<DatasetContext> hoverBorderWidthCallback)
Sets the hover border width callback.protected void
setWidths(Key key, int... widths)
Sets a width property in the dataset, setting a single value or an array.-
Methods inherited from class org.pepstock.charba.client.data.HoverFlexDataset
getBackgroundColor, getBackgroundColorAsGradient, getBackgroundColorAsPatterns, getBackgroundColorAsString, getBorderColor, getBorderColorAsGradient, getBorderColorAsString, getBorderWidth, getHoverBackgroundColor, getHoverBorderColor, getHoverBorderWidth, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderColor, setBorderWidth, setHoverBorderWidth
-
Methods inherited from class org.pepstock.charba.client.data.Dataset
createContext, getAnimationContainer, getBackgroundColorCallback, getBorderColorCallback, getClip, getClipAsObject, getData, getData, getDataCount, getDataset, getDataType, getDefaultBackgroundColorAsString, getDefaultBorderColorAsString, getDefaultBorderWidth, getDefaultHoverBackgroundColorAsString, getDefaultHoverBorderColorAsString, getDefaultHoverBorderWidth, getDefaultValues, getHoverBackgroundColorCallback, getHoverBorderColorCallback, getId, getLabel, 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, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, 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
checkAndGetColor, 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, 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, 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
-
-
-
-
Constructor Detail
-
HoverDataset
protected HoverDataset(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
-
setColors
protected void setColors(Key key, String... colors)
Description copied from class:HoverFlexDataset
Sets a color property in the dataset, setting a single value or an array.- Overrides:
setColors
in classHoverFlexDataset
- Parameters:
key
- property keycolors
- colors value to be set
-
setColors
protected void setColors(Key key, IsColor... colors)
Description copied from class:HoverFlexDataset
Sets a color property in the dataset, setting a single value or an array.- Overrides:
setColors
in classHoverFlexDataset
- Parameters:
key
- property keycolors
- colors value to be set
-
getColors
protected ArrayString getColors(Key key, String defaultvalue)
Description copied from class:HoverFlexDataset
Returns an array of colors as string.- Overrides:
getColors
in classHoverFlexDataset
- Parameters:
key
- property keydefaultvalue
- default value if key does not exist- Returns:
- an array of colors
-
setWidths
protected void setWidths(Key key, int... widths)
Description copied from class:HoverFlexDataset
Sets a width property in the dataset, setting a single value or an array.- Overrides:
setWidths
in classHoverFlexDataset
- Parameters:
key
- property keywidths
- widths value to be set
-
getWidths
protected ArrayInteger getWidths(Key key, int defaultvalue)
Description copied from class:HoverFlexDataset
Returns an array of widths as integer- Overrides:
getWidths
in classHoverFlexDataset
- Parameters:
key
- property keydefaultvalue
- default value if key does not exist- Returns:
- an array of widths
-
getBorderWidthCallback
public WidthCallback<DatasetContext> getBorderWidthCallback()
Returns the border width callback, if set, otherwisenull
.- Returns:
- the border width callback, if set, otherwise
null
-
setBorderWidth
public void setBorderWidth(WidthCallback<DatasetContext> 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
-
setHoverBackgroundColor
public void setHoverBackgroundColor(IsColor... colors)
Sets the fill color of the arcs when hovered.- Overrides:
setHoverBackgroundColor
in classHoverFlexDataset
- Parameters:
colors
- the fill color of the arcs when hovered
-
setHoverBackgroundColor
public void setHoverBackgroundColor(String... colors)
Sets the fill color of the arcs when hovered as string.- Overrides:
setHoverBackgroundColor
in classHoverFlexDataset
- Parameters:
colors
- the fill color of the arcs when hovered as string
-
setHoverBackgroundColor
public void setHoverBackgroundColor(Pattern... colors)
Sets the fill pattern of the arcs in the data set when hovered.- Overrides:
setHoverBackgroundColor
in classHoverFlexDataset
- Parameters:
colors
- the fill pattern of the arcs in the data set when hovered.
-
setHoverBackgroundColor
public void setHoverBackgroundColor(Gradient... colors)
Sets the fill gradient of the arcs in the data set when hovered.- Overrides:
setHoverBackgroundColor
in classHoverFlexDataset
- Parameters:
colors
- the fill gradient of the arcs in the data set when hovered.
-
getHoverBackgroundColorAsString
public List<String> getHoverBackgroundColorAsString()
Returns the fill color of the arcs when hovered as string.
If property is missing or not a color, returns an empty list.- Overrides:
getHoverBackgroundColorAsString
in classHoverFlexDataset
- Returns:
- list of the fill color of the arcs when hovered as string.
If property is missing or not a color, returns an empty list
-
getHoverBackgroundColorAsPatterns
public List<Pattern> getHoverBackgroundColorAsPatterns()
Returns the fill patterns of the arcs in the data set when hovered.
If property is missing or not a pattern, returns an empty list.- Overrides:
getHoverBackgroundColorAsPatterns
in classHoverFlexDataset
- Returns:
- list of the fill patterns of the arcs in the data set when hovered.
If property is missing or not a pattern, returns an empty list
-
getHoverBackgroundColorAsGradient
public List<Gradient> getHoverBackgroundColorAsGradient()
Returns the fill gradients of the arcs in the data set when hovered.
If property is missing or not a gradient, returns an empty list.- Overrides:
getHoverBackgroundColorAsGradient
in classHoverFlexDataset
- Returns:
- list of the fill gradients of the arcs in the data set when hovered.
If property is missing or not a gradient, returns an empty list.
-
setHoverBorderColor
public void setHoverBorderColor(IsColor... colors)
Sets the stroke color of the arcs when hovered as string.- Overrides:
setHoverBorderColor
in classHoverFlexDataset
- Parameters:
colors
- the stroke color of the arcs when hovered as string
-
setHoverBorderColor
public void setHoverBorderColor(String... colors)
Sets the stroke color of the arcs when hovered as string.- Overrides:
setHoverBorderColor
in classHoverFlexDataset
- Parameters:
colors
- the stroke color of the arcs when hovered as string
-
setHoverBorderColor
public void setHoverBorderColor(Gradient... colors)
Sets the stroke gradient of the arcs in the data set when hovered as gradient.- Overrides:
setHoverBorderColor
in classHoverFlexDataset
- Parameters:
colors
- the stroke gradient of the arcs in the data set when hovered as gradient.
-
getHoverBorderColorAsString
public List<String> getHoverBorderColorAsString()
Returns the stroke color of the arcs when hovered.- Overrides:
getHoverBorderColorAsString
in classHoverFlexDataset
- Returns:
- list of the stroke color of the arcs when hovered.
-
getHoverBorderColorAsGradient
public List<Gradient> getHoverBorderColorAsGradient()
Returns the stroke gradients of the arcs in the data set when hovered.
If property is missing or not a pattern, returns an empty list.- Overrides:
getHoverBorderColorAsGradient
in classHoverFlexDataset
- Returns:
- list of the stroke gradients of the arcs in the data set when hovered.
If property is missing or not a pattern, returns an empty list.
-
getHoverBorderWidthCallback
public WidthCallback<DatasetContext> getHoverBorderWidthCallback()
Returns the hover border width callback, if set, otherwisenull
.- Returns:
- the hover border width callback, if set, otherwise
null
.
-
setHoverBorderWidth
public void setHoverBorderWidth(WidthCallback<DatasetContext> hoverBorderWidthCallback)
Sets the hover border width callback.- Parameters:
hoverBorderWidthCallback
- the hover border width callback to set
-
-