Class Arc
- java.lang.Object
-
- org.pepstock.charba.client.configuration.Arc
-
public class Arc extends Object
Arcs are used in the polar area, doughnut and pie 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.AngleCallback
getAngleCallback()
Returns the angle callback, if set, otherwisenull
.IsColor
getBackgroundColor()
Returns the background color.String
getBackgroundColorAsString()
Returns the background color.ColorCallback<DatasetContext>
getBackgroundColorCallback()
Returns the background color callback, if set, otherwisenull
.BorderAlign
getBorderAlign()
Returns the property to set the border alignment on chart datasets.BorderAlignCallback
getBorderAlignCallback()
Returns the border align callback, if set, otherwisenull
.IsColor
getBorderColor()
Returns the border color.String
getBorderColorAsString()
Returns the border color.ColorCallback<DatasetContext>
getBorderColorCallback()
Returns the border color callback, if set, otherwisenull
.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).JoinStyleCallback<DatasetContext>
getBorderJoinStyleCallback()
Returns the border join style callback, if set, otherwisenull
.int
getBorderRadius()
Returns the arc border radius (in pixels).BorderRadiusCallback<DatasetContext>
getBorderRadiusCallback()
Returns the border radius callback, if set, otherwisenull
.int
getBorderWidth()
Returns the border width.WidthCallback<DatasetContext>
getBorderWidthCallback()
Returns the border width callback, if set, otherwisenull
.IsChart
getChart()
Returns the chart instanceprotected ExtendedOptions
getConfiguration()
Returns the configuration element.protected IsDefaultArc
getDefaultElement()
Returns the element instance to be managed.protected AbstractElement<IsDefaultArc>
getElement()
Returns the element instance to be managed.IsColor
getHoverBackgroundColor()
Returns the background color when hovered.String
getHoverBackgroundColorAsString()
Returns the background color when hovered.ColorCallback<DatasetContext>
getHoverBackgroundColorCallback()
Returns the background color callback, if set, otherwisenull
.IsColor
getHoverBorderColor()
Returns the border color when hovered.String
getHoverBorderColorAsString()
Returns the border color when hovered.ColorCallback<DatasetContext>
getHoverBorderColorCallback()
Returns the border color callback, if set, otherwisenull
.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).JoinStyleCallback<DatasetContext>
getHoverBorderJoinStyleCallback()
Returns the hover border join style callback, if set, otherwisenull
.int
getHoverBorderWidth()
Returns the border width when hovered.WidthCallback<DatasetContext>
getHoverBorderWidthCallback()
Returns the border width callback, if set, otherwisenull
.int
getHoverOffset()
Returns the arc offset (in pixels) when hovered.OffsetCallback<DatasetContext>
getHoverOffsetCallback()
Returns the offset callback, if set, otherwisenull
.int
getOffset()
Returns the arc offset (in pixels).OffsetCallback<DatasetContext>
getOffsetCallback()
Returns the offset callback, if set, otherwisenull
.protected ConfigurationOptions
getOptions()
Returns the configuration options.int
getSpacing()
Returns the fixed arc offset (in pixels).
Similar tooffset
but applies to all arcs.double
getWeight()
Returns the relative thickness of the data set.
Providing a value for weight will cause the pie or doughnut data set to be drawn with a thickness relative to the sum of all the data set weight values.void
setAngle(double angle)
Sets the arc angle to cover.void
setAngle(AngleCallback angleCallback)
Sets the angle callback.void
setAngle(NativeCallback angleCallback)
Sets the angle callback.void
setBackgroundColor(String backgroundColor)
Sets the background color.void
setBackgroundColor(ColorCallback<DatasetContext> backgroundColorCallback)
Sets the background color callback.void
setBackgroundColor(NativeCallback backgroundColorCallback)
Sets the background color callback.void
setBackgroundColor(IsColor backgroundColor)
Sets the background color.void
setBorderAlign(BorderAlignCallback borderAlignCallback)
Sets the border align callback.void
setBorderAlign(NativeCallback borderAlignCallback)
Sets the border align callback.void
setBorderAlign(BorderAlign align)
Sets the property to set the border alignment on chart datasets.void
setBorderColor(String borderColor)
Sets the border color.void
setBorderColor(ColorCallback<DatasetContext> borderColorCallback)
Sets the border color callback.void
setBorderColor(NativeCallback borderColorCallback)
Sets the border color callback.void
setBorderColor(IsColor borderColor)
Sets the border color.void
setBorderJoinStyle(JoinStyleCallback<DatasetContext> borderJoinStyleCallback)
Sets the border join style callback.void
setBorderJoinStyle(NativeCallback borderJoinStyleCallback)
Sets the border join style callback.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(BorderRadiusCallback<DatasetContext> borderRadiusCallback)
Sets the border radius callback.void
setBorderRadius(NativeCallback borderRadiusCallback)
Sets the border radius callback.void
setBorderWidth(int borderWidth)
Sets the border width.void
setBorderWidth(NativeCallback borderWidthCallback)
Sets the border width callback.void
setBorderWidth(WidthCallback<DatasetContext> borderWidthCallback)
Sets the border width callback.void
setHoverBackgroundColor(String backgroundColor)
Sets the background color when hovered.void
setHoverBackgroundColor(ColorCallback<DatasetContext> hoverBackgroundColorCallback)
Sets the background color callback, as hovered.void
setHoverBackgroundColor(NativeCallback hoverBackgroundColorCallback)
Sets the background color callback, as hovered.void
setHoverBackgroundColor(IsColor backgroundColor)
Sets the background color when hovered.void
setHoverBorderColor(String borderColor)
Sets the border color when hovered.void
setHoverBorderColor(ColorCallback<DatasetContext> hoverBorderColorCallback)
Sets the border color callback, as hovered.void
setHoverBorderColor(NativeCallback hoverBorderColorCallback)
Sets the border color callback, as hovered.void
setHoverBorderColor(IsColor borderColor)
Sets the border color when hovered.void
setHoverBorderJoinStyle(JoinStyleCallback<DatasetContext> hoverBorderJoinStyleCallback)
Sets the hover border join style callback.void
setHoverBorderJoinStyle(NativeCallback hoverBorderJoinStyleCallback)
Sets the hover border join style callback.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).void
setHoverBorderWidth(int borderWidth)
Sets the border width when hovered.void
setHoverBorderWidth(NativeCallback hoverBorderWidthCallback)
Sets the border width callback, as hovered.void
setHoverBorderWidth(WidthCallback<DatasetContext> hoverBorderWidthCallback)
Sets the border width callback, as hovered.void
setHoverOffset(int offset)
Sets the arc offset (in pixels) when hovered.void
setHoverOffset(NativeCallback hoverOffsetCallback)
Sets the offset callback, when hovered.void
setHoverOffset(OffsetCallback<DatasetContext> hoverOffsetCallback)
Sets the offset callback, when hovered.void
setOffset(int offset)
Sets the arc offset (in pixels).void
setOffset(NativeCallback offsetCallback)
Sets the offset callback.void
setOffset(OffsetCallback<DatasetContext> offsetCallback)
Sets the offset callback.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 data set.
Providing a value for weight will cause the pie or doughnut data set to be drawn with a thickness relative to the sum of all the data set weight values.
-
-
-
Method Detail
-
getElement
protected AbstractElement<IsDefaultArc> getElement()
Returns the element instance to be managed.- Returns:
- the element instance to be managed
-
getDefaultElement
protected IsDefaultArc getDefaultElement()
Returns the element instance to be managed.- Returns:
- the element instance to be managed
-
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.- 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).- 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).- 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).- 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 data set.
Providing a value for weight will cause the pie or doughnut data set to be drawn with a thickness relative to the sum of all the data set weight values.- Parameters:
weight
- the relative thickness of the data set
-
getWeight
public double getWeight()
Returns the relative thickness of the data set.
Providing a value for weight will cause the pie or doughnut data set to be drawn with a thickness relative to the sum of all the data set weight values.- Returns:
- the relative thickness of the data set
-
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.- 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).- Returns:
- the arc offset
-
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)
-
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).- 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.- Returns:
- the arc offset when hovered
-
getBorderAlignCallback
public BorderAlignCallback getBorderAlignCallback()
Returns the border align callback, if set, otherwisenull
.- Returns:
- the border align callback, if set, otherwise
null
.
-
setBorderAlign
public void setBorderAlign(BorderAlignCallback borderAlignCallback)
Sets the border align callback.- Parameters:
borderAlignCallback
- the border align callback.
-
setBorderAlign
public void setBorderAlign(NativeCallback borderAlignCallback)
Sets the border align callback.- Parameters:
borderAlignCallback
- the border align callback.
-
getBorderJoinStyleCallback
public JoinStyleCallback<DatasetContext> getBorderJoinStyleCallback()
Returns the border join style callback, if set, otherwisenull
.- Returns:
- the border join style callback, if set, otherwise
null
.
-
setBorderJoinStyle
public void setBorderJoinStyle(JoinStyleCallback<DatasetContext> borderJoinStyleCallback)
Sets the border join style callback.- Parameters:
borderJoinStyleCallback
- the border join style callback.
-
setBorderJoinStyle
public void setBorderJoinStyle(NativeCallback borderJoinStyleCallback)
Sets the border join style callback.- Parameters:
borderJoinStyleCallback
- the border join style callback.
-
getHoverBorderJoinStyleCallback
public JoinStyleCallback<DatasetContext> getHoverBorderJoinStyleCallback()
Returns the hover border join style callback, if set, otherwisenull
.- Returns:
- the hover border join style callback, if set, otherwise
null
.
-
setHoverBorderJoinStyle
public void setHoverBorderJoinStyle(JoinStyleCallback<DatasetContext> hoverBorderJoinStyleCallback)
Sets the hover border join style callback.- Parameters:
hoverBorderJoinStyleCallback
- the hover border join style callback.
-
setHoverBorderJoinStyle
public void setHoverBorderJoinStyle(NativeCallback hoverBorderJoinStyleCallback)
Sets the hover border join style callback.- Parameters:
hoverBorderJoinStyleCallback
- the hover border join style callback.
-
getBorderRadiusCallback
public BorderRadiusCallback<DatasetContext> getBorderRadiusCallback()
Returns the border radius callback, if set, otherwisenull
.- Returns:
- the border radius callback, if set, otherwise
null
.
-
setBorderRadius
public void setBorderRadius(BorderRadiusCallback<DatasetContext> borderRadiusCallback)
Sets the border radius callback.- Parameters:
borderRadiusCallback
- the border radius callback.
-
setBorderRadius
public void setBorderRadius(NativeCallback borderRadiusCallback)
Sets the border radius callback.- Parameters:
borderRadiusCallback
- the border radius callback.
-
getOffsetCallback
public OffsetCallback<DatasetContext> getOffsetCallback()
Returns the offset callback, if set, otherwisenull
.- Returns:
- the offset callback, if set, otherwise
null
.
-
setOffset
public void setOffset(OffsetCallback<DatasetContext> offsetCallback)
Sets the offset callback.- Parameters:
offsetCallback
- the offset callback.
-
setOffset
public void setOffset(NativeCallback offsetCallback)
Sets the offset callback.- Parameters:
offsetCallback
- the offset callback.
-
getHoverOffsetCallback
public OffsetCallback<DatasetContext> getHoverOffsetCallback()
Returns the offset callback, if set, otherwisenull
.- Returns:
- the offset callback, if set, otherwise
null
.
-
setHoverOffset
public void setHoverOffset(OffsetCallback<DatasetContext> hoverOffsetCallback)
Sets the offset callback, when hovered.- Parameters:
hoverOffsetCallback
- the offset callback, when hovered.
-
setHoverOffset
public void setHoverOffset(NativeCallback hoverOffsetCallback)
Sets the offset callback, when hovered.- Parameters:
hoverOffsetCallback
- the offset callback, when hovered.
-
getAngleCallback
public AngleCallback getAngleCallback()
Returns the angle callback, if set, otherwisenull
.- Returns:
- the angle callback, if set, otherwise
null
.
-
setAngle
public void setAngle(AngleCallback angleCallback)
Sets the angle callback.- Parameters:
angleCallback
- the angle callback.
-
setAngle
public void setAngle(NativeCallback angleCallback)
Sets the angle callback.- Parameters:
angleCallback
- the angle callback.
-
setBackgroundColor
public void setBackgroundColor(IsColor backgroundColor)
Sets the background color.- Parameters:
backgroundColor
- the background color.
-
setBackgroundColor
public void setBackgroundColor(String backgroundColor)
Sets the background color.- Parameters:
backgroundColor
- the background color.
-
getBackgroundColorAsString
public String getBackgroundColorAsString()
Returns the background color.- Returns:
- the background color.
-
getBackgroundColor
public IsColor getBackgroundColor()
Returns the background color.- Returns:
- the background color.
-
setBorderWidth
public void setBorderWidth(int borderWidth)
Sets the border width.- Parameters:
borderWidth
- the border width.
-
getBorderWidth
public int getBorderWidth()
Returns the border width.- Returns:
- the border width.
-
setBorderColor
public void setBorderColor(IsColor borderColor)
Sets the border color.- Parameters:
borderColor
- the border color.
-
setBorderColor
public void setBorderColor(String borderColor)
Sets the border color.- Parameters:
borderColor
- the border color.
-
getBorderColorAsString
public String getBorderColorAsString()
Returns the border color.- Returns:
- the border color.
-
getBorderColor
public IsColor getBorderColor()
Returns the border color.- Returns:
- the border color.
-
setHoverBackgroundColor
public void setHoverBackgroundColor(IsColor backgroundColor)
Sets the background color when hovered.- Parameters:
backgroundColor
- the background color when hovered.
-
setHoverBackgroundColor
public void setHoverBackgroundColor(String backgroundColor)
Sets the background color when hovered.- Parameters:
backgroundColor
- the background color when hovered.
-
getHoverBackgroundColorAsString
public String getHoverBackgroundColorAsString()
Returns the background color when hovered.- Returns:
- the background color when hovered.
-
getHoverBackgroundColor
public IsColor getHoverBackgroundColor()
Returns the background color when hovered.- Returns:
- the background color when hovered.
-
setHoverBorderWidth
public void setHoverBorderWidth(int borderWidth)
Sets the border width when hovered.- Parameters:
borderWidth
- the border width when hovered.
-
getHoverBorderWidth
public int getHoverBorderWidth()
Returns the border width when hovered.- Returns:
- the border width when hovered.
-
setHoverBorderColor
public void setHoverBorderColor(IsColor borderColor)
Sets the border color when hovered.- Parameters:
borderColor
- the border color when hovered.
-
setHoverBorderColor
public void setHoverBorderColor(String borderColor)
Sets the border color when hovered.- Parameters:
borderColor
- the border color when hovered.
-
getHoverBorderColorAsString
public String getHoverBorderColorAsString()
Returns the border color when hovered.- Returns:
- the border color when hovered.
-
getHoverBorderColor
public IsColor getHoverBorderColor()
Returns the border color when hovered.- Returns:
- the border color when hovered.
-
getBackgroundColorCallback
public ColorCallback<DatasetContext> getBackgroundColorCallback()
Returns the background color callback, if set, otherwisenull
.- Returns:
- the background color callback, if set, otherwise
null
.
-
setBackgroundColor
public void setBackgroundColor(ColorCallback<DatasetContext> backgroundColorCallback)
Sets the background color callback.- Parameters:
backgroundColorCallback
- the background color callback.
-
setBackgroundColor
public void setBackgroundColor(NativeCallback backgroundColorCallback)
Sets the background color callback.- Parameters:
backgroundColorCallback
- the background color callback.
-
getBorderColorCallback
public ColorCallback<DatasetContext> getBorderColorCallback()
Returns the border color callback, if set, otherwisenull
.- Returns:
- the border color callback, if set, otherwise
null
.
-
setBorderColor
public void setBorderColor(ColorCallback<DatasetContext> borderColorCallback)
Sets the border color callback.- Parameters:
borderColorCallback
- the border color callback.
-
setBorderColor
public void setBorderColor(NativeCallback borderColorCallback)
Sets the border color callback.- Parameters:
borderColorCallback
- the border color callback.
-
getBorderWidthCallback
public WidthCallback<DatasetContext> getBorderWidthCallback()
Returns the border width callback, if set, otherwisenull
.- Returns:
- the border width callback, if set, otherwise
null
.
-
setBorderWidth
public void setBorderWidth(WidthCallback<DatasetContext> borderWidthCallback)
Sets the border width callback.- Parameters:
borderWidthCallback
- the border width callback.
-
setBorderWidth
public void setBorderWidth(NativeCallback borderWidthCallback)
Sets the border width callback.- Parameters:
borderWidthCallback
- the border width callback.
-
getHoverBackgroundColorCallback
public ColorCallback<DatasetContext> getHoverBackgroundColorCallback()
Returns the background color callback, if set, otherwisenull
.- Returns:
- the background color callback, if set, otherwise
null
.
-
setHoverBackgroundColor
public void setHoverBackgroundColor(ColorCallback<DatasetContext> hoverBackgroundColorCallback)
Sets the background color callback, as hovered.- Parameters:
hoverBackgroundColorCallback
- the background color callback, as hovered
-
setHoverBackgroundColor
public void setHoverBackgroundColor(NativeCallback hoverBackgroundColorCallback)
Sets the background color callback, as hovered.- Parameters:
hoverBackgroundColorCallback
- the background color callback, as hovered
-
getHoverBorderColorCallback
public ColorCallback<DatasetContext> getHoverBorderColorCallback()
Returns the border color callback, if set, otherwisenull
.- Returns:
- the border color callback, if set, otherwise
null
.
-
setHoverBorderColor
public void setHoverBorderColor(ColorCallback<DatasetContext> hoverBorderColorCallback)
Sets the border color callback, as hovered.- Parameters:
hoverBorderColorCallback
- the border color callback, as hovered
-
setHoverBorderColor
public void setHoverBorderColor(NativeCallback hoverBorderColorCallback)
Sets the border color callback, as hovered.- Parameters:
hoverBorderColorCallback
- the border color callback, as hovered
-
getHoverBorderWidthCallback
public WidthCallback<DatasetContext> getHoverBorderWidthCallback()
Returns the border width callback, if set, otherwisenull
.- Returns:
- the border width callback, if set, otherwise
null
.
-
setHoverBorderWidth
public void setHoverBorderWidth(WidthCallback<DatasetContext> hoverBorderWidthCallback)
Sets the border width callback, as hovered.- Parameters:
hoverBorderWidthCallback
- the border width callback, as hovered
-
setHoverBorderWidth
public void setHoverBorderWidth(NativeCallback hoverBorderWidthCallback)
Sets the border width callback, as hovered.- Parameters:
hoverBorderWidthCallback
- the border width callback, as hovered
-
getOptions
protected final ConfigurationOptions getOptions()
Returns the configuration options.- Returns:
- the configuration options.
-
getConfiguration
protected final ExtendedOptions getConfiguration()
Returns the configuration element.- Returns:
- the configuration element.
-
getChart
public final IsChart getChart()
Returns the chart instance- Returns:
- the chart
-
-