Package org.pepstock.charba.client.items
Class ArcElementOptions
- 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.ArcElementOptions
-
public class ArcElementOptions extends CommonElementOptions
Maps the out-of-the-box CHART.JS element options used to represents arcs on the charts.- Author:
- Andrea "Stock" Stocchero
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getAngle()
Returns the arc angle to cover.ArcBorderRadius
getArcBorderRadius()
Returns the list of arc border radius objects.
If a callback or an array have been set, returns an empty object.BorderAlign
getBorderAlign()
Returns the property to set the border alignment on chart datasets.JoinStyle
getBorderJoinStyle()
Returns how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).int
getBorderRadius()
Returns the list of arc border radius (in pixels).
If a callback has been set, returns an empty list.protected int
getDefaultBorderWidth()
This method must be overrided by all element where the border width is stored in different object.int
getOffset()
Returns the arc offset (in pixels).int
getSpacing()
Returns the fixed arc offset (in pixels).
Similar tooffset
but applies to all arcs.double
getWeight()
Returns the relative thickness of the dataset.boolean
isCircular()
Returnstrue
if the arc is curved.void
setAngle(double angle)
Sets the arc angle to cover.void
setBorderAlign(BorderAlign align)
Sets the property to set the border alignment on chart datasets.void
setBorderJoinStyle(JoinStyle borderJoinStyle)
Sets how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).void
setBorderRadius(int borderRadius)
Sets the arc border radius (in pixels).void
setBorderRadius(ArcBorderRadius borderRadius)
Sets the arc border radius (as object).void
setCircular(int circular)
Setstrue
if the arc is curved.void
setOffset(int offset)
Sets the arc offset (in pixels).void
setSpacing(int spacing)
Sets the fixed arc offset (in pixels).
Similar tooffset
but applies to all arcs.void
setWeight(double weight)
Sets the relative thickness of the dataset.
Providing a value for weight will cause the pie or doughnut dataset to be drawn with a thickness relative to the sum of all the dataset weight values.-
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: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
-
getBorderAlign
public BorderAlign getBorderAlign()
Returns the property to set the border alignment on chart datasets.- Returns:
- the property to set the border alignment on chart datasets.
-
setBorderAlign
public void setBorderAlign(BorderAlign align)
Sets the property to set the border alignment on chart datasets.- Parameters:
align
- the property to set the border alignment on chart datasets
-
getWeight
public double getWeight()
Returns the relative thickness of the dataset.- Returns:
- the relative thickness of the dataset
-
setWeight
public void setWeight(double weight)
Sets the relative thickness of the dataset.
Providing a value for weight will cause the pie or doughnut dataset to be drawn with a thickness relative to the sum of all the dataset weight values.- Parameters:
weight
- the relative thickness of the dataset
-
getAngle
public double getAngle()
Returns the arc angle to cover.- Returns:
- the arc angle to cover
-
setAngle
public void setAngle(double angle)
Sets the arc angle to cover.- Parameters:
angle
- the arc angle to cover
-
getOffset
public int getOffset()
Returns the arc offset (in pixels).- Returns:
- the arc offset
-
setOffset
public void setOffset(int offset)
Sets the arc offset (in pixels).- Parameters:
offset
- the arc offset
-
getBorderJoinStyle
public JoinStyle getBorderJoinStyle()
Returns how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).- Returns:
- how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
-
setBorderJoinStyle
public void setBorderJoinStyle(JoinStyle borderJoinStyle)
Sets how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together (degenerate segments with zero lengths, whose specified end points and control points are exactly at the same position, are skipped).- Parameters:
borderJoinStyle
- how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
-
getBorderRadius
public int getBorderRadius()
Returns the list of arc border radius (in pixels).
If a callback has been set, returns an empty list.- Returns:
- the list of arc border radius (in pixels).
If a callback has been set, returns an empty list
-
setBorderRadius
public void setBorderRadius(int borderRadius)
Sets the arc border radius (in pixels).- Parameters:
borderRadius
- the arc border radius (in pixels).
-
getArcBorderRadius
public ArcBorderRadius getArcBorderRadius()
Returns the list of arc border radius objects.
If a callback or an array have been set, returns an empty object.- Returns:
- the list of arc border radius objects.
If a callback or an array have been set, returns an empty object
-
setBorderRadius
public void setBorderRadius(ArcBorderRadius borderRadius)
Sets the arc border radius (as object).- Parameters:
borderRadius
- the arc border radius (as object).
-
isCircular
public boolean isCircular()
Returnstrue
if the arc is curved.- Returns:
true
if the arc is curved
-
setCircular
public void setCircular(int circular)
Setstrue
if the arc is curved.- Parameters:
circular
-true
if the arc is curved
-
setSpacing
public void setSpacing(int spacing)
Sets the fixed arc offset (in pixels).
Similar tooffset
but applies to all arcs.- Parameters:
spacing
- the fixed arc offset (in pixels)
-
getSpacing
public int getSpacing()
Returns the fixed arc offset (in pixels).
Similar tooffset
but applies to all arcs.- Returns:
- the fixed arc offset (in pixels)
-
-