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 TooltipLabelPointStylecreateTooltipLabelPointStyle()Create newTooltipLabelPointStylefilling it with point style and rotation of dataset element.protected intgetDefaultBorderWidth()This method must be overrided by all element where the border width is stored in different object.doublegetHitRadius()Returns the pixel size of the non-displayed point that reacts to mouse events.intgetHoverBorderWidth()Returns the border width of point when hovered.doublegetHoverRadius()Returns the radius of the point when hovered.PointStylegetPointStyle()Returns the style of the point.CanvasgetPointStyleAsCanvas()Returns the style of the point as canvas.
If property is missing or not an canvas, returnsnull.ImggetPointStyleAsImage()Returns the style of the point as image.
If property is missing or not an image, returnsnull.PointStyleTypegetPointStyleType()Returns the type of point style.doublegetRadius()Returns the radius of the point.doublegetRotation()Returns the point rotation (in degrees).voidsetHitRadius(double hitRadius)Sets the pixel size of the non-displayed point that reacts to mouse events.voidsetHoverBorderWidth(int borderWidth)Sets the border width of point when hovered.voidsetHoverRadius(double hoverRadius)Sets the radius of the point when hovered.voidsetPointStyle(boolean pointStyle)Sets the style of the point.voidsetPointStyle(Canvas pointStyle)Sets the style of the point as canvas.voidsetPointStyle(Img pointStyle)Sets the style of the point as image.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.voidsetRotation(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, 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, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
-
-
-
-
Method Detail
-
getDefaultBorderWidth
protected int getDefaultBorderWidth()
Description copied from class:CommonElementOptionsThis method must be overrided by all element where the border width is stored in different object.- Overrides:
getDefaultBorderWidthin 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(boolean 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.
-
setPointStyle
public void setPointStyle(PointStyle pointStyle)
Sets the style of the point.- Parameters:
pointStyle- array of the style of the point.
-
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 newTooltipLabelPointStylefilling it with point style and rotation of dataset element.- Returns:
- new
TooltipLabelPointStylefilling it with point style and rotation of dataset element
-
-