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 doublegetAngle()Returns the arc angle to cover.ArcBorderRadiusgetArcBorderRadius()Returns the list of arc border radius objects.
If a callback or an array have been set, returns an empty object.BorderAligngetBorderAlign()Returns the property to set the border alignment on chart datasets.JoinStylegetBorderJoinStyle()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).intgetBorderRadius()Returns the list of arc border radius (in pixels).
If a callback has been set, returns an empty list.protected intgetDefaultBorderWidth()This method must be overrided by all element where the border width is stored in different object.intgetOffset()Returns the arc offset (in pixels).intgetSpacing()Returns the fixed arc offset (in pixels).
Similar tooffsetbut applies to all arcs.doublegetWeight()Returns the relative thickness of the dataset.booleanisCircular()Returnstrueif the arc is curved.voidsetAngle(double angle)Sets the arc angle to cover.voidsetBorderAlign(BorderAlign align)Sets the property to set the border alignment on chart datasets.voidsetBorderJoinStyle(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).voidsetBorderRadius(int borderRadius)Sets the arc border radius (in pixels).voidsetBorderRadius(ArcBorderRadius borderRadius)Sets the arc border radius (as object).voidsetCircular(int circular)Setstrueif the arc is curved.voidsetOffset(int offset)Sets the arc offset (in pixels).voidsetSpacing(int spacing)Sets the fixed arc offset (in pixels).
Similar tooffsetbut applies to all arcs.voidsetWeight(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, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, 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, 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:CommonElementOptionsThis method must be overrided by all element where the border width is stored in different object.- Overrides:
getDefaultBorderWidthin 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()
Returnstrueif the arc is curved.- Returns:
trueif the arc is curved
-
setCircular
public void setCircular(int circular)
Setstrueif the arc is curved.- Parameters:
circular-trueif the arc is curved
-
setSpacing
public void setSpacing(int spacing)
Sets the fixed arc offset (in pixels).
Similar tooffsetbut applies to all arcs.- Parameters:
spacing- the fixed arc offset (in pixels)
-
getSpacing
public int getSpacing()
Returns the fixed arc offset (in pixels).
Similar tooffsetbut applies to all arcs.- Returns:
- the fixed arc offset (in pixels)
-
-