Package org.pepstock.charba.client.data
Class BubbleDataset
-
- All Implemented Interfaces:
HasCallbackScope,HasDataPoints,HasDataset,IsDefaultAnimationContainer,IsDefaultAnimationTransition,HasAnimationOptions
- Direct Known Subclasses:
BubbleMapDataset
public class BubbleDataset extends HoverDataset implements HasDataPoints
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.
The location of the bubble is determined by the first two dimensions and the corresponding horizontal and vertical axes.
The third dimension is represented by the size of the individual bubbles.- 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 BubbleDataset()Creates a data set.
It uses the global options has default.BubbleDataset(boolean hidden)Creates a data set.
It uses the global options has default.BubbleDataset(IsDefaultOptions defaultValues)Creates the data set using a default.BubbleDataset(IsDefaultOptions defaultValues, boolean hidden)Creates the data set using a default.protectedBubbleDataset(Type type, boolean hidden)Creates the data set using chart type related to the data set.protectedBubbleDataset(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 protected StringgetDefaultBackgroundColorAsString()Returns the default background color value based on type of chart.protected StringgetDefaultBorderColorAsString()Returns the default border color value based on type of chart.protected intgetDefaultBorderWidth()Returns the default border width value based on type of chart.protected StringgetDefaultHoverBackgroundColorAsString()Returns the default background color value based on type of chart.protected StringgetDefaultHoverBorderColorAsString()Returns the default border color value based on type of chart.protected intgetDefaultHoverBorderWidth()Returns the default border width value based on type of chart.DrawActiveElementsOnTopCallbackgetDrawActiveElementsOnTopCallback()Returns the callback, if draws the active points of a dataset over the other points of the dataset.List<Double>getHitRadius()Returns the pixel size of the non-displayed point that reacts to mouse events.RadiusCallback<DatasetContext>getHitRadiusCallback()Returns the hit radius callback, if set, otherwisenull.List<Double>getHoverRadius()Returns the radius of the point when hovered.RadiusCallback<DatasetContext>getHoverRadiusCallback()Returns the hover radius callback, if set, otherwisenull.default intgetOrder()Returns the drawing order of dataset.
Also affects order for stacking, tooltip, and legend.org.pepstock.charba.client.data.OrderHandlergetOrderHandler()default List<PointStyle>getPointStyle()Returns the style of the point.default List<Canvas>getPointStyleAsCanvas()Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull.default List<Img>getPointStyleAsImages()Returns the style of the point as image.
If property is missing or not an image, returnsnull.default PointStyleCallback<DatasetContext>getPointStyleCallback()Returns the point style callback, if set, otherwisenull.org.pepstock.charba.client.data.DataPointStyleHandlergetPointStyleHandler()default PointStyleTypegetPointStyleType()Returns the type of point style.List<Double>getRadius()Returns the radius of the point shape.RadiusCallback<DatasetContext>getRadiusCallback()Returns the radius callback, if set, otherwisenull.List<Double>getRotation()Returns the rotation of the point in degrees.RotationCallback<DatasetContext>getRotationCallback()Returns the rotation callback, if set, otherwisenull.booleanisDrawActiveElementsOnTop()Returns if draws the active points of a dataset over the other points of the dataset.voidsetDrawActiveElementsOnTop(boolean drawActiveElementsOnTop)Sets if draws the active points of a dataset over the other points of the dataset.voidsetDrawActiveElementsOnTop(DrawActiveElementsOnTopCallback drawActiveElementsOnTopCallback)Sets the callback, if draws the active points of a dataset over the other points of the dataset.voidsetDrawActiveElementsOnTop(NativeCallback drawActiveElementsOnTopCallback)Sets the callback, if draws the active points of a dataset over the other points of the dataset.voidsetHitRadius(double... hitRadius)Sets the pixel size of the non-displayed point that reacts to mouse events.voidsetHitRadius(NativeCallback hitRadiusCallback)Sets the hit radius callback.voidsetHitRadius(RadiusCallback<DatasetContext> hitRadiusCallback)Sets the hit radius callback.voidsetHoverRadius(double... hoverRadius)Sets the radius of the point when hovered.voidsetHoverRadius(NativeCallback hoverRadiusCallback)Sets the hover radius callback.voidsetHoverRadius(RadiusCallback<DatasetContext> hoverRadiusCallback)Sets the hover radius callback.default voidsetOrder(int order)Sets the drawing order of dataset.
Also affects order for stacking, tooltip, and legend.default voidsetPointStyle(PointStyleCallback<DatasetContext> pointStyleCallback)Sets the point style callback.default voidsetPointStyle(Canvas... pointStyle)Sets the style of the point as canvas.default voidsetPointStyle(Img... pointStyle)Sets the style of the point as image.default voidsetPointStyle(PointStyle... pointStyle)Sets the style of the point.voidsetRadius(double... radius)Sets the radius of the point shape.
If set to 0, the point is not rendered.voidsetRadius(NativeCallback radiusCallback)Sets the radius callback.voidsetRadius(RadiusCallback<DatasetContext> radiusCallback)Sets the radius callback.voidsetRotation(double... rotation)Sets the rotation of the point in degrees.voidsetRotation(NativeCallback rotationCallback)Sets the rotation callback.voidsetRotation(RotationCallback<DatasetContext> rotationCallback)Sets the rotation callback.-
Methods inherited from class org.pepstock.charba.client.data.HoverDataset
getBorderWidthCallback, getColors, getHoverBackgroundColorAsGradient, getHoverBackgroundColorAsPatterns, getHoverBackgroundColorAsString, getHoverBorderColorAsGradient, getHoverBorderColorAsString, getHoverBorderWidthCallback, getWidths, setBorderWidth, setBorderWidth, setColors, setColors, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderWidth, setWidths
-
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, 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
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
-
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
-
-
-
-
Constructor Detail
-
BubbleDataset
public BubbleDataset()
Creates a data set.
It uses the global options has default.
-
BubbleDataset
public BubbleDataset(boolean hidden)
Creates a data set.
It uses the global options has default.- Parameters:
hidden- iftrue, it will be initially hidden.
-
BubbleDataset
public BubbleDataset(IsDefaultOptions defaultValues)
Creates the data set using a default.- Parameters:
defaultValues- default options
-
BubbleDataset
public BubbleDataset(IsDefaultOptions defaultValues, boolean hidden)
Creates the data set using a default.- Parameters:
defaultValues- default optionshidden- iftrue, it will be initially hidden.
-
BubbleDataset
protected BubbleDataset(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.
-
BubbleDataset
protected BubbleDataset(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()
-
getPointStyleHandler
public final org.pepstock.charba.client.data.DataPointStyleHandler getPointStyleHandler()
-
getDefaultBackgroundColorAsString
protected String getDefaultBackgroundColorAsString()
Description copied from class:DatasetReturns the default background color value based on type of chart.- Overrides:
getDefaultBackgroundColorAsStringin classDataset- Returns:
- the default background color value based on type of chart.
-
getDefaultBorderColorAsString
protected String getDefaultBorderColorAsString()
Description copied from class:DatasetReturns the default border color value based on type of chart.- Overrides:
getDefaultBorderColorAsStringin classDataset- Returns:
- the default border color value based on type of chart.
-
getDefaultBorderWidth
protected int getDefaultBorderWidth()
Description copied from class:DatasetReturns the default border width value based on type of chart.- Overrides:
getDefaultBorderWidthin classDataset- Returns:
- the default border width value based on type of chart.
-
getDefaultHoverBackgroundColorAsString
protected String getDefaultHoverBackgroundColorAsString()
Description copied from class:DatasetReturns the default background color value based on type of chart.- Overrides:
getDefaultHoverBackgroundColorAsStringin classDataset- Returns:
- the default background color value based on type of chart.
-
getDefaultHoverBorderColorAsString
protected String getDefaultHoverBorderColorAsString()
Description copied from class:DatasetReturns the default border color value based on type of chart.- Overrides:
getDefaultHoverBorderColorAsStringin classDataset- Returns:
- the default border color value based on type of chart.
-
getDefaultHoverBorderWidth
protected int getDefaultHoverBorderWidth()
Description copied from class:DatasetReturns the default border width value based on type of chart.- Overrides:
getDefaultHoverBorderWidthin classDataset- Returns:
- the default border width value based on type of chart.
-
setDrawActiveElementsOnTop
public void setDrawActiveElementsOnTop(boolean drawActiveElementsOnTop)
Sets if draws the active points of a dataset over the other points of the dataset.- Parameters:
drawActiveElementsOnTop- iftrue, draws the active points of a dataset over the other points of the dataset
-
isDrawActiveElementsOnTop
public boolean isDrawActiveElementsOnTop()
Returns if draws the active points of a dataset over the other points of the dataset.- Returns:
- if draws the active points of a dataset over the other points of the dataset.
-
getDrawActiveElementsOnTopCallback
public DrawActiveElementsOnTopCallback getDrawActiveElementsOnTopCallback()
Returns the callback, if draws the active points of a dataset over the other points of the dataset.- Returns:
- the callback, if draws the active points of a dataset over the other points of the dataset
-
setDrawActiveElementsOnTop
public void setDrawActiveElementsOnTop(NativeCallback drawActiveElementsOnTopCallback)
Sets the callback, if draws the active points of a dataset over the other points of the dataset.- Parameters:
drawActiveElementsOnTopCallback- the callback, if draws the active points of a dataset over the other points of the dataset.
-
setDrawActiveElementsOnTop
public void setDrawActiveElementsOnTop(DrawActiveElementsOnTopCallback drawActiveElementsOnTopCallback)
Sets the callback, if draws the active points of a dataset over the other points of the dataset.- Parameters:
drawActiveElementsOnTopCallback- the callback, if draws the active points of a dataset over the other points of the dataset.
-
setHitRadius
public void setHitRadius(double... hitRadius)
Sets the pixel size of the non-displayed point that reacts to mouse events.- Parameters:
hitRadius- array of the pixel size of the non-displayed point.
-
getHitRadius
public List<Double> getHitRadius()
Returns the pixel size of the non-displayed point that reacts to mouse events.- Returns:
- list of the pixel size of the non-displayed point.
-
setHoverRadius
public void setHoverRadius(double... hoverRadius)
Sets the radius of the point when hovered.- Parameters:
hoverRadius- array of the radius of the point when hovered.
-
getHoverRadius
public List<Double> getHoverRadius()
Returns the radius of the point when hovered.- Returns:
- list of the radius of the point when hovered.
-
setRadius
public void setRadius(double... radius)
Sets the radius of the point shape.
If set to 0, the point is not rendered.- Parameters:
radius- array of the radius of the point shape.
-
getRadius
public List<Double> getRadius()
Returns the radius of the point shape.- Returns:
- list of the radius of the point shape.
-
setRotation
public void setRotation(double... rotation)
Sets the rotation of the point in degrees.- Parameters:
rotation- array of the rotation of the point in degrees.
-
getRotation
public List<Double> getRotation()
Returns the rotation of the point in degrees.- Returns:
- list of the rotation of the point in degrees.
-
getRadiusCallback
public RadiusCallback<DatasetContext> getRadiusCallback()
Returns the radius callback, if set, otherwisenull.- Returns:
- the radius callback, if set, otherwise
null.
-
setRadius
public void setRadius(RadiusCallback<DatasetContext> radiusCallback)
Sets the radius callback.- Parameters:
radiusCallback- the radius callback to set
-
setRadius
public void setRadius(NativeCallback radiusCallback)
Sets the radius callback.- Parameters:
radiusCallback- the radius callback to set
-
getHitRadiusCallback
public RadiusCallback<DatasetContext> getHitRadiusCallback()
Returns the hit radius callback, if set, otherwisenull.- Returns:
- the hit radius callback, if set, otherwise
null.
-
setHitRadius
public void setHitRadius(RadiusCallback<DatasetContext> hitRadiusCallback)
Sets the hit radius callback.- Parameters:
hitRadiusCallback- the hit radius callback to set
-
setHitRadius
public void setHitRadius(NativeCallback hitRadiusCallback)
Sets the hit radius callback.- Parameters:
hitRadiusCallback- the hit radius callback to set
-
getHoverRadiusCallback
public RadiusCallback<DatasetContext> getHoverRadiusCallback()
Returns the hover radius callback, if set, otherwisenull.- Returns:
- the hover radius callback, if set, otherwise
null.
-
setHoverRadius
public void setHoverRadius(RadiusCallback<DatasetContext> hoverRadiusCallback)
Sets the hover radius callback.- Parameters:
hoverRadiusCallback- the hover radius callback to set
-
setHoverRadius
public void setHoverRadius(NativeCallback hoverRadiusCallback)
Sets the hover radius callback.- Parameters:
hoverRadiusCallback- the hover radius callback to set
-
getRotationCallback
public RotationCallback<DatasetContext> getRotationCallback()
Returns the rotation callback, if set, otherwisenull.- Returns:
- the rotation callback, if set, otherwise
null.
-
setRotation
public void setRotation(RotationCallback<DatasetContext> rotationCallback)
Sets the rotation callback.- Parameters:
rotationCallback- the rotation callback to set
-
setRotation
public void setRotation(NativeCallback rotationCallback)
Sets the rotation callback.- Parameters:
rotationCallback- the rotation callback to set
-
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
-
setPointStyle
public default void setPointStyle(PointStyle... pointStyle)
Sets the style of the point.- Parameters:
pointStyle- array of the style of the point.
-
getPointStyle
public default List<PointStyle> getPointStyle()
Returns the style of the point.- Returns:
- the style of the point or
nullif point style is set as image
-
setPointStyle
public default void setPointStyle(Img... pointStyle)
Sets the style of the point as image.- Parameters:
pointStyle- image element of the style of the point as image.
-
getPointStyleType
public default PointStyleType getPointStyleType()
Returns the type of point style.- Returns:
- the type of point style
-
getPointStyleAsImages
public default List<Img> getPointStyleAsImages()
Returns the style of the point as image.
If property is missing or not an image, returnsnull.- Returns:
- image of the style of the point as image.
If property is missing or not a image, returnsnull.
-
setPointStyle
public default void setPointStyle(Canvas... pointStyle)
Sets the style of the point as canvas.- Parameters:
pointStyle- canvas element of the style of the point as canvas.
-
getPointStyleAsCanvas
public default List<Canvas> getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull.- Returns:
- image of the style of the point as canvas.
If property is missing or not a canvas, returnsnull.
-
getPointStyleCallback
public default PointStyleCallback<DatasetContext> getPointStyleCallback()
Returns the point style callback, if set, otherwisenull.- Returns:
- the point style callback, if set, otherwise
null.
-
setPointStyle
public default void setPointStyle(PointStyleCallback<DatasetContext> pointStyleCallback)
Sets the point style callback.- Parameters:
pointStyleCallback- the point style callback.
-
-