Class Arc
-
- All Implemented Interfaces:
IsDefaultArc,IsDefaultOptionsElement
public class Arc extends AbstractElement<IsDefaultArc> implements IsDefaultArc
Arcs are used in the polar area, doughnut and pie charts.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedArc(Elements elements, Key childKey, IsDefaultArc defaultValues, NativeObject nativeObject)Creates the object with the parent, the key of this element, default values and native object to map java script properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAngle()Returns the arc angle to cover.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 arc border radius (in pixels).JoinStylegetHoverBorderJoinStyle()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), when hovered.intgetHoverOffset()Returns the arc offset (in pixels) when hovered.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.
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.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).voidsetHoverBorderJoinStyle(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), when hovered.voidsetHoverOffset(int offset)Sets the arc offset (in pixels) when hovered.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.options.AbstractElement
getBackgroundColor, getBackgroundColorAsString, getBorderColor, getBorderColorAsString, getBorderWidth, getHoverBackgroundColor, getHoverBackgroundColorAsString, getHoverBorderColor, getHoverBorderColorAsString, getHoverBorderWidth, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderWidth, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderWidth
-
Methods inherited from class org.pepstock.charba.client.options.AbstractModel
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
-
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
-
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.defaults.IsDefaultOptionsElement
getBackgroundColorAsString, getBorderColorAsString, getBorderWidth, getHoverBackgroundColorAsString, getHoverBorderColorAsString, getHoverBorderWidth
-
-
-
-
Constructor Detail
-
Arc
protected Arc(Elements elements, Key childKey, IsDefaultArc defaultValues, NativeObject nativeObject)
Creates the object with the parent, the key of this element, default values and native object to map java script properties.- Parameters:
elements- parent node to use to add this element where changedchildKey- the property name of this element to use to add it to the parent.defaultValues- default providernativeObject- native object to map java script properties
-
-
Method Detail
-
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
-
getBorderAlign
public BorderAlign getBorderAlign()
Returns the property to set the border alignment on chart datasets.- Specified by:
getBorderAlignin interfaceIsDefaultArc- Returns:
- the property to set the border alignment on chart datasets.
-
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
-
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).- Specified by:
getBorderJoinStylein interfaceIsDefaultArc- Returns:
- how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
-
setHoverBorderJoinStyle
public void setHoverBorderJoinStyle(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), when hovered.- Parameters:
borderJoinStyle- how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
-
getHoverBorderJoinStyle
public JoinStyle getHoverBorderJoinStyle()
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), when hovered.- Specified by:
getHoverBorderJoinStylein interfaceIsDefaultArc- Returns:
- how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined together
-
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
-
getWeight
public double getWeight()
Returns 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.- Specified by:
getWeightin interfaceIsDefaultArc- Returns:
- the relative thickness of the dataset
-
setAngle
public void setAngle(double angle)
Sets the arc angle to cover.- Parameters:
angle- the arc angle to cover
-
getAngle
public double getAngle()
Returns the arc angle to cover.- Specified by:
getAnglein interfaceIsDefaultArc- Returns:
- the arc angle to cover
-
setOffset
public void setOffset(int offset)
Sets the arc offset (in pixels).- Parameters:
offset- the arc offset
-
getOffset
public int getOffset()
Returns the arc offset (in pixels).- Specified by:
getOffsetin interfaceIsDefaultArc- Returns:
- the arc offset
-
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.- Specified by:
getSpacingin interfaceIsDefaultArc- Returns:
- the fixed arc offset (in pixels)
-
setBorderRadius
public void setBorderRadius(int borderRadius)
Sets the arc border radius (in pixels).- Parameters:
borderRadius- the arc border radius (in pixels).
-
getBorderRadius
public int getBorderRadius()
Returns the arc border radius (in pixels).- Specified by:
getBorderRadiusin interfaceIsDefaultArc- Returns:
- the arc border radius (in pixels).
-
setHoverOffset
public void setHoverOffset(int offset)
Sets the arc offset (in pixels) when hovered.- Parameters:
offset- the arc offset when hovered
-
getHoverOffset
public int getHoverOffset()
Returns the arc offset (in pixels) when hovered.- Specified by:
getHoverOffsetin interfaceIsDefaultArc- Returns:
- the arc offset when hovered
-
-