public final class Line extends AbstractElement<IsDefaultLine> implements IsDefaultLine
Modifier and Type | Method and Description |
---|---|
CapStyle |
getBorderCapStyle()
Returns how the end points of every line are drawn.
|
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.
|
int |
getBorderDashOffset()
Returns the line dash pattern offset or "phase".
|
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).
There are three possible values for this property: round, bevel and miter. |
IsFill |
getFill()
Returns how to fill the area under the line.
|
double |
getTension()
Returns the Bezier curve tension (0 for no Bezier curves).
|
boolean |
isCapBezierPoints()
Returns
true to keep Bezier control inside the chart, false for no restriction. |
boolean |
isStepped()
Returns
true to show the line as a stepped line (tension will be ignored). |
void |
setBorderCapStyle(CapStyle borderCapStyle)
Sets how the end points of every line are drawn.
|
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 |
setBorderDashOffset(int borderDashOffset)
Sets the line dash pattern offset or "phase".
|
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).
There are three possible values for this property: round, bevel and miter. |
void |
setCapBezierPoints(boolean capBezierPoints)
Sets
true to keep Bezier control inside the chart, false for no restriction. |
void |
setFill(boolean fill)
Sets how to fill the area under the line.
|
void |
setFill(int index)
Sets how to fill the area under the line, by absolute dataset index.
|
void |
setFill(IsFill fill)
Sets how to fill the area under the line.
|
void |
setFill(String index)
Sets how to fill the area under the line, by relative dataset index.
|
void |
setStepped(boolean stepped)
Sets
true to show the line as a stepped line (tension will be ignored). |
void |
setTension(double tension)
Returns the Bezier curve tension (0 for no Bezier curves).
|
getBackgroundColor, getBackgroundColorAsString, getBorderColor, getBorderColorAsString, getBorderWidth, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderWidth
checkAndAddToParent, getChildKey, getDefaultValues, getParent, setCallbackToModel, setEventToModel
getArrayValue, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBackgroundColorAsString, getBorderColorAsString, getBorderWidth
public void setTension(double tension)
tension
- the Bezier curve tension (0 for no Bezier curves).public double getTension()
getTension
in interface IsDefaultLine
public void setBorderCapStyle(CapStyle borderCapStyle)
borderCapStyle
- how the end points of every line are drawn.public CapStyle getBorderCapStyle()
getBorderCapStyle
in interface IsDefaultLine
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(int borderDashOffset)
borderDashOffset
- the line dash pattern offset or "phase".public int getBorderDashOffset()
getBorderDashOffset
in interface IsDefaultLine
public void setBorderJoinStyle(JoinStyle borderJoinStyle)
borderJoinStyle
- there are three possible values for this property: round, bevel and miter.public JoinStyle getBorderJoinStyle()
getBorderJoinStyle
in interface IsDefaultLine
public void setCapBezierPoints(boolean capBezierPoints)
true
to keep Bezier control inside the chart, false
for no restriction.capBezierPoints
- true
to keep Bezier control inside the chart, false
for no restriction.public boolean isCapBezierPoints()
true
to keep Bezier control inside the chart, false
for no restriction.isCapBezierPoints
in interface IsDefaultLine
true
to keep Bezier control inside the chart, false
for no restriction.public void setFill(boolean fill)
fill
- true
to fill, otherwise false
.public void setFill(int index)
index
- absolute dataset index of the chart.public void setFill(String index)
index
- relative dataset index of the chart.public void setFill(IsFill fill)
fill
- how to fill the area under the line.public IsFill getFill()
getFill
in interface IsDefaultLine
public void setStepped(boolean stepped)
true
to show the line as a stepped line (tension will be ignored).stepped
- true
to show the line as a stepped line (tension will be ignored).public boolean isStepped()
true
to show the line as a stepped line (tension will be ignored).isStepped
in interface IsDefaultLine
true
to show the line as a stepped line (tension will be ignored).