Package org.pepstock.charba.client.items
Class PointElementOptions
- java.lang.Object
-
- org.pepstock.charba.client.commons.NativeObjectContainer
-
- org.pepstock.charba.client.commons.AbstractNode
-
- org.pepstock.charba.client.items.ChartElementOptions
-
- org.pepstock.charba.client.items.CommonElementOptions
-
- org.pepstock.charba.client.items.PointElementOptions
-
public class PointElementOptions extends CommonElementOptions
Maps the out-of-the-box CHART.JS element options used to represents points on the charts.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TooltipLabelPointStyle
createTooltipLabelPointStyle()
Create newTooltipLabelPointStyle
filling it with point style and rotation of dataset element.protected int
getDefaultBorderWidth()
This method must be overrided by all element where the border width is stored in different object.double
getHitRadius()
Returns the pixel size of the non-displayed point that reacts to mouse events.int
getHoverBorderWidth()
Returns the border width of point when hovered.double
getHoverRadius()
Returns the radius of the point when hovered.PointStyle
getPointStyle()
Returns the style of the point.Canvas
getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull
.Img
getPointStyleAsImage()
Returns the style of the point as image.
If property is missing or not an image, returnsnull
.PointStyleType
getPointStyleType()
Returns the type of point style.double
getRadius()
Returns the radius of the point.double
getRotation()
Returns the point rotation (in degrees).void
setHitRadius(double hitRadius)
Sets the pixel size of the non-displayed point that reacts to mouse events.void
setHoverBorderWidth(int borderWidth)
Sets the border width of point when hovered.void
setHoverRadius(double hoverRadius)
Sets the radius of the point when hovered.void
setPointStyle(Canvas pointStyle)
Sets the style of the point as canvas.void
setPointStyle(Img pointStyle)
Sets the style of the point as image.void
setPointStyle(PointStyle pointStyle)
Sets the style of the point.void
setRadius(double radius)
Sets the radius of the point shape.
If set to 0, the point is not rendered.void
setRotation(double rotation)
Sets the point rotation (in degrees).-
Methods inherited from class org.pepstock.charba.client.items.CommonElementOptions
createTooltipLabelColor, getBackgroundColor, getBackgroundColorAsCanvasGradient, getBackgroundColorAsCanvasPattern, getBackgroundColorAsGradient, getBackgroundColorAsPattern, getBackgroundColorAsString, getBorderColor, getBorderColorAsCanvasGradient, getBorderColorAsGradient, getBorderColorAsString, getBorderWidth, inRange, inXRange, inYRange, isBackgroundColorAsColor, isBackgroundColorAsGradient, isBackgroundColorAsPattern, isBorderColorAsColor, isBorderColorAsGradient, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderColor, setBorderWidth
-
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
-
-
-
-
Method Detail
-
getDefaultBorderWidth
protected int getDefaultBorderWidth()
Description copied from class:CommonElementOptions
This method must be overrided by all element where the border width is stored in different object.- Overrides:
getDefaultBorderWidth
in classCommonElementOptions
- Returns:
- an undefined integer
-
getRadius
public double getRadius()
Returns the radius of the point.- Returns:
- the radius of the point
-
getHitRadius
public double getHitRadius()
Returns the pixel size of the non-displayed point that reacts to mouse events.- Returns:
- the pixel size of the non-displayed point.
-
getHoverRadius
public double getHoverRadius()
Returns the radius of the point when hovered.- Returns:
- the radius of the point when hovered.
-
getHoverBorderWidth
public int getHoverBorderWidth()
Returns the border width of point when hovered.- Returns:
- the border width of point when hovered.
-
getRotation
public double getRotation()
Returns the point rotation (in degrees).- Returns:
- the point rotation (in degrees).
-
getPointStyleType
public PointStyleType getPointStyleType()
Returns the type of point style.- Returns:
- the type of point style
-
getPointStyleAsImage
public Img getPointStyleAsImage()
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
.
-
getPointStyleAsCanvas
public Canvas getPointStyleAsCanvas()
Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull
.- Returns:
- canvas of the style of the point as canvas.
If property is missing or not a canvas, returnsnull
.
-
getPointStyle
public PointStyle getPointStyle()
Returns the style of the point.- Returns:
- the style of the point
-
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.
-
setHitRadius
public void setHitRadius(double hitRadius)
Sets the pixel size of the non-displayed point that reacts to mouse events.- Parameters:
hitRadius
- the pixel size of the non-displayed point.
-
setHoverRadius
public void setHoverRadius(double hoverRadius)
Sets the radius of the point when hovered.- Parameters:
hoverRadius
- the radius of the point when hovered.
-
setRotation
public void setRotation(double rotation)
Sets the point rotation (in degrees).- Parameters:
rotation
- the point rotation (in degrees).
-
setPointStyle
public void setPointStyle(PointStyle pointStyle)
Sets the style of the point.- Parameters:
pointStyle
- array of the style of the point.
-
setPointStyle
public void setPointStyle(Img pointStyle)
Sets the style of the point as image.- Parameters:
pointStyle
- image element of the style of the point as image.
-
setPointStyle
public void setPointStyle(Canvas pointStyle)
Sets the style of the point as canvas.- Parameters:
pointStyle
- canvas element of the style of the point as canvas.
-
setHoverBorderWidth
public void setHoverBorderWidth(int borderWidth)
Sets the border width of point when hovered.- Parameters:
borderWidth
- the border width of point when hovered.
-
createTooltipLabelPointStyle
public TooltipLabelPointStyle createTooltipLabelPointStyle()
Create newTooltipLabelPointStyle
filling it with point style and rotation of dataset element.- Returns:
- new
TooltipLabelPointStyle
filling it with point style and rotation of dataset element
-
-