public class Line extends Object
Modifier and Type | Method and Description |
---|---|
IsColor |
getBackgroundColor()
Returns the background color.
|
String |
getBackgroundColorAsString()
Returns the background color.
|
ColorCallback<DatasetContext> |
getBackgroundColorCallback()
Returns the background color callback, if set, otherwise
null . |
CapStyle |
getBorderCapStyle()
Returns how the end points of every line are drawn.
|
CapStyleCallback<DatasetContext> |
getBorderCapStyleCallback()
Returns the border capstyle callback, if set, otherwise
null . |
IsColor |
getBorderColor()
Returns the border color.
|
String |
getBorderColorAsString()
Returns the border color.
|
ColorCallback<DatasetContext> |
getBorderColorCallback()
Returns the border color callback, if set, otherwise
null . |
List<Integer> |
getBorderDash()
Returns the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
|
BorderDashCallback<DatasetContext> |
getBorderDashCallback()
Returns the border dash callback, if set, otherwise
null . |
double |
getBorderDashOffset()
Returns the line dash pattern offset.
|
BorderDashOffsetCallback<DatasetContext> |
getBorderDashOffsetCallback()
Returns the border dash offset callback, if set, otherwise
null . |
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, otherwise
null . |
int |
getBorderWidth()
Returns the border width.
|
WidthCallback<DatasetContext> |
getBorderWidthCallback()
Returns the border width callback, if set, otherwise
null . |
IsChart |
getChart()
Returns the chart instance
|
protected ExtendedOptions |
getConfiguration()
Returns the configuration element.
|
CubicInterpolationMode |
getCubicInterpolationMode()
Returns algorithm used to interpolate a smooth curve from the discrete data points.
|
CubicInterpolationModeCallback |
getCubicInterpolationModeCallback()
Returns the cubic interpolation mode callback, if set, otherwise
null . |
protected IsDefaultLine |
getDefaultElement()
Returns the element instance to be managed.
|
protected AbstractElement<IsDefaultLine> |
getElement()
Returns the element instance to be managed.
|
IsFill |
getFill()
Returns how to fill the area under the line.
|
FillCallback |
getFillCallback()
Returns the fill callback, if set, otherwise
null . |
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, otherwise
null . |
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, otherwise
null . |
int |
getHoverBorderWidth()
Returns the border width when hovered.
|
WidthCallback<DatasetContext> |
getHoverBorderWidthCallback()
Returns the border width callback, if set, otherwise
null . |
protected ConfigurationOptions |
getOptions()
Returns the configuration options.
|
Stepped |
getStepped()
Returns if the line is shown as a stepped line.
|
SteppedCallback |
getSteppedCallback()
Returns the stepped callback, if set, otherwise
null . |
double |
getTension()
Returns the Bézier curve tension (0 for no Bézier curves).
|
boolean |
isCapBezierPoints()
Returns
true to keep Bézier control inside the chart, false for no restriction. |
void |
setBackgroundColor(ColorCallback<DatasetContext> backgroundColorCallback)
Sets the background color callback.
|
void |
setBackgroundColor(IsColor backgroundColor)
Sets the background color.
|
void |
setBackgroundColor(NativeCallback backgroundColorCallback)
Sets the background color callback.
|
void |
setBackgroundColor(String backgroundColor)
Sets the background color.
|
void |
setBorderCapStyle(CapStyle borderCapStyle)
Sets how the end points of every line are drawn.
|
void |
setBorderCapStyle(CapStyleCallback<DatasetContext> borderCapStyleCallback)
Sets the border capstyle callback.
|
void |
setBorderCapStyle(NativeCallback borderCapStyleCallback)
Sets the border capstyle callback.
|
void |
setBorderColor(ColorCallback<DatasetContext> borderColorCallback)
Sets the border color callback.
|
void |
setBorderColor(IsColor borderColor)
Sets the border color.
|
void |
setBorderColor(NativeCallback borderColorCallback)
Sets the border color callback.
|
void |
setBorderColor(String borderColor)
Sets the border color.
|
void |
setBorderDash(BorderDashCallback<DatasetContext> borderDashCallback)
Sets the border dash callback.
|
void |
setBorderDash(int... borderDash)
Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.
|
void |
setBorderDash(NativeCallback borderDashCallback)
Sets the border dash callback.
|
void |
setBorderDashOffset(BorderDashOffsetCallback<DatasetContext> borderDashOffsetCallback)
Sets the border dash offset callback.
|
void |
setBorderDashOffset(double borderDashOffset)
Sets the line dash pattern offset.
|
void |
setBorderDashOffset(NativeCallback borderDashOffsetCallback)
Sets the border dash offset 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 |
setBorderJoinStyle(JoinStyleCallback<DatasetContext> borderJoinStyleCallback)
Sets the border join style callback.
|
void |
setBorderJoinStyle(NativeCallback borderJoinStyleCallback)
Sets the border join style 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 |
setCapBezierPoints(boolean capBezierPoints)
Sets
true to keep Bézier control inside the chart, false for no restriction. |
void |
setCubicInterpolationMode(CubicInterpolationMode mode)
Sets algorithm used to interpolate a smooth curve from the discrete data points.
The following interpolation modes are supported: |
void |
setCubicInterpolationMode(CubicInterpolationModeCallback cubicInterpolationModeCallback)
Sets the cubic interpolation mode callback.
|
void |
setCubicInterpolationMode(NativeCallback cubicInterpolationModeCallback)
Sets the cubic interpolation mode callback.
|
void |
setFill(boolean fill)
Sets how to fill the area under the line.
|
void |
setFill(FillCallback fillCallback)
Sets the fill callback.
|
void |
setFill(int index)
Sets how to fill the area under the line, by absolute data set index.
|
void |
setFill(IsFill fill)
Sets how to fill the area under the line.
|
void |
setFill(NativeCallback fillCallback)
Sets the fill callback.
|
void |
setFill(String index)
Sets how to fill the area under the line, by relative data set index.
|
void |
setHoverBackgroundColor(ColorCallback<DatasetContext> hoverBackgroundColorCallback)
Sets the background color callback, as hovered.
|
void |
setHoverBackgroundColor(IsColor backgroundColor)
Sets the background color when hovered.
|
void |
setHoverBackgroundColor(NativeCallback hoverBackgroundColorCallback)
Sets the background color callback, as hovered.
|
void |
setHoverBackgroundColor(String backgroundColor)
Sets the background color when hovered.
|
void |
setHoverBorderColor(ColorCallback<DatasetContext> hoverBorderColorCallback)
Sets the border color callback, as hovered.
|
void |
setHoverBorderColor(IsColor borderColor)
Sets the border color when hovered.
|
void |
setHoverBorderColor(NativeCallback hoverBorderColorCallback)
Sets the border color callback, as hovered.
|
void |
setHoverBorderColor(String borderColor)
Sets the border color when hovered.
|
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 |
setStepped(boolean stepped)
Sets if the line is shown as a stepped line.
If the stepped value is set to anything other than false, tension will be ignored. |
void |
setStepped(NativeCallback steppedCallback)
Sets the stepped callback.
|
void |
setStepped(Stepped stepped)
Sets if the line is shown as a stepped line.
If the stepped value is set to anything other than false, tension will be ignored. |
void |
setStepped(SteppedCallback steppedCallback)
Sets the stepped callback.
|
void |
setTension(double tension)
Returns the Bézier curve tension (0 for no Bézier curves).
|
protected AbstractElement<IsDefaultLine> getElement()
protected IsDefaultLine getDefaultElement()
public void setTension(double tension)
tension
- the Bézier curve tension (0 for no Bézier curves).public double getTension()
public void setBorderCapStyle(CapStyle borderCapStyle)
borderCapStyle
- how the end points of every line are drawn.public CapStyle getBorderCapStyle()
public void setBorderDash(int... borderDash)
borderDash
- the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern.public List<Integer> getBorderDash()
public void setBorderDashOffset(double borderDashOffset)
borderDashOffset
- the line dash pattern offset.public double getBorderDashOffset()
public void setBorderJoinStyle(JoinStyle borderJoinStyle)
borderJoinStyle
- how two connecting segments (of lines, arcs or curves) with non-zero lengths in a shape are joined togetherpublic JoinStyle getBorderJoinStyle()
public void setCapBezierPoints(boolean capBezierPoints)
true
to keep Bézier control inside the chart, false
for no restriction.capBezierPoints
- true
to keep Bézier control inside the chart, false
for no restriction.public boolean isCapBezierPoints()
true
to keep Bézier control inside the chart, false
for no restriction.true
to keep Bézier control inside the chart, false
for no restriction.public void setCubicInterpolationMode(CubicInterpolationMode mode)
'default' 'monotone'
mode
- algorithm used to interpolate a smooth curve from the discrete data pointspublic CubicInterpolationMode getCubicInterpolationMode()
public void setFill(boolean fill)
fill
- true
to fill, otherwise false
.public void setFill(int index)
index
- absolute data set index of the chart.public void setFill(String index)
index
- relative data set index of the chart.public void setFill(IsFill fill)
fill
- how to fill the area under the line.public IsFill getFill()
public void setStepped(boolean stepped)
stepped
- if the line is shown as a stepped line. false
is no step interpolationpublic void setStepped(Stepped stepped)
stepped
- if the line is shown as a stepped line.public Stepped getStepped()
public CapStyleCallback<DatasetContext> getBorderCapStyleCallback()
null
.null
.public void setBorderCapStyle(CapStyleCallback<DatasetContext> borderCapStyleCallback)
borderCapStyleCallback
- the border capstyle callback.public void setBorderCapStyle(NativeCallback borderCapStyleCallback)
borderCapStyleCallback
- the border capstyle callback.public BorderDashCallback<DatasetContext> getBorderDashCallback()
null
.null
.public void setBorderDash(BorderDashCallback<DatasetContext> borderDashCallback)
borderDashCallback
- the border dash callback.public void setBorderDash(NativeCallback borderDashCallback)
borderDashCallback
- the border dash callback.public BorderDashOffsetCallback<DatasetContext> getBorderDashOffsetCallback()
null
.null
.public void setBorderDashOffset(BorderDashOffsetCallback<DatasetContext> borderDashOffsetCallback)
borderDashOffsetCallback
- the border dash offset callback.public void setBorderDashOffset(NativeCallback borderDashOffsetCallback)
borderDashOffsetCallback
- the border dash offset callback.public JoinStyleCallback<DatasetContext> getBorderJoinStyleCallback()
null
.null
.public void setBorderJoinStyle(JoinStyleCallback<DatasetContext> borderJoinStyleCallback)
borderJoinStyleCallback
- the border join style callback.public void setBorderJoinStyle(NativeCallback borderJoinStyleCallback)
borderJoinStyleCallback
- the border join style callback.public CubicInterpolationModeCallback getCubicInterpolationModeCallback()
null
.null
.public void setCubicInterpolationMode(CubicInterpolationModeCallback cubicInterpolationModeCallback)
cubicInterpolationModeCallback
- the cubic interpolation mode callback.public void setCubicInterpolationMode(NativeCallback cubicInterpolationModeCallback)
cubicInterpolationModeCallback
- the cubic interpolation mode callback.public FillCallback getFillCallback()
null
.null
.public void setFill(FillCallback fillCallback)
fillCallback
- the fill callback.public void setFill(NativeCallback fillCallback)
fillCallback
- the fill callback.public SteppedCallback getSteppedCallback()
null
.null
.public void setStepped(SteppedCallback steppedCallback)
steppedCallback
- the stepped callback.public void setStepped(NativeCallback steppedCallback)
steppedCallback
- the stepped callback.public void setBackgroundColor(IsColor backgroundColor)
backgroundColor
- the background color.public void setBackgroundColor(String backgroundColor)
backgroundColor
- the background color.public String getBackgroundColorAsString()
public IsColor getBackgroundColor()
public void setBorderWidth(int borderWidth)
borderWidth
- the border width.public int getBorderWidth()
public void setBorderColor(IsColor borderColor)
borderColor
- the border color.public void setBorderColor(String borderColor)
borderColor
- the border color.public String getBorderColorAsString()
public IsColor getBorderColor()
public void setHoverBackgroundColor(IsColor backgroundColor)
backgroundColor
- the background color when hovered.public void setHoverBackgroundColor(String backgroundColor)
backgroundColor
- the background color when hovered.public String getHoverBackgroundColorAsString()
public IsColor getHoverBackgroundColor()
public void setHoverBorderWidth(int borderWidth)
borderWidth
- the border width when hovered.public int getHoverBorderWidth()
public void setHoverBorderColor(IsColor borderColor)
borderColor
- the border color when hovered.public void setHoverBorderColor(String borderColor)
borderColor
- the border color when hovered.public String getHoverBorderColorAsString()
public IsColor getHoverBorderColor()
public ColorCallback<DatasetContext> getBackgroundColorCallback()
null
.null
.public void setBackgroundColor(ColorCallback<DatasetContext> backgroundColorCallback)
backgroundColorCallback
- the background color callback.public void setBackgroundColor(NativeCallback backgroundColorCallback)
backgroundColorCallback
- the background color callback.public ColorCallback<DatasetContext> getBorderColorCallback()
null
.null
.public void setBorderColor(ColorCallback<DatasetContext> borderColorCallback)
borderColorCallback
- the border color callback.public void setBorderColor(NativeCallback borderColorCallback)
borderColorCallback
- the border color callback.public WidthCallback<DatasetContext> getBorderWidthCallback()
null
.null
.public void setBorderWidth(WidthCallback<DatasetContext> borderWidthCallback)
borderWidthCallback
- the border width callback.public void setBorderWidth(NativeCallback borderWidthCallback)
borderWidthCallback
- the border width callback.public ColorCallback<DatasetContext> getHoverBackgroundColorCallback()
null
.null
.public void setHoverBackgroundColor(ColorCallback<DatasetContext> hoverBackgroundColorCallback)
hoverBackgroundColorCallback
- the background color callback, as hoveredpublic void setHoverBackgroundColor(NativeCallback hoverBackgroundColorCallback)
hoverBackgroundColorCallback
- the background color callback, as hoveredpublic ColorCallback<DatasetContext> getHoverBorderColorCallback()
null
.null
.public void setHoverBorderColor(ColorCallback<DatasetContext> hoverBorderColorCallback)
hoverBorderColorCallback
- the border color callback, as hoveredpublic void setHoverBorderColor(NativeCallback hoverBorderColorCallback)
hoverBorderColorCallback
- the border color callback, as hoveredpublic WidthCallback<DatasetContext> getHoverBorderWidthCallback()
null
.null
.public void setHoverBorderWidth(WidthCallback<DatasetContext> hoverBorderWidthCallback)
hoverBorderWidthCallback
- the border width callback, as hoveredpublic void setHoverBorderWidth(NativeCallback hoverBorderWidthCallback)
hoverBorderWidthCallback
- the border width callback, as hoveredprotected final ConfigurationOptions getOptions()
protected final ExtendedOptions getConfiguration()
public final IsChart getChart()