public final class Line extends AbstractElement<IsDefaultLine> implements IsDefaultLine, HasFill
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAndAddToParent()
Called recursively when a property has been set in the item.
This is mandatory because it could happen that the parent item is not present, therefore it must be added. |
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. |
protected Key |
getChildKey()
Returns the property name to use to add this element to its parent.
|
CubicInterpolationMode |
getCubicInterpolationMode()
Returns algorithm used to interpolate a smooth curve from the discrete data points.
|
protected D |
getDefaultValues()
Returns the default provider instance.
|
IsFill |
getFill()
Returns how to fill the area under the line.
|
Filler |
getFiller()
Returns a filler instance to use into default methods of this interface.
|
protected P |
getParent()
Returns the parent element.
|
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. |
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. |
protected void |
setCallbackToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
Adds a proxy function (for callbacks) to a model at the specific key.
|
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: |
protected void |
setEventToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
Adds a proxy function (for events) to a model at the specific key.
|
void |
setFill(boolean fill)
Sets how to fill the area under the line.
|
void |
setFill(IsFill fill)
Sets how to fill the area under the line.
|
void |
setStepped(boolean stepped)
Sets
true to show the line as a stepped line (tension will be ignored). |
void |
setTension(double tension)
Returns the Bézier curve tension (0 for no Bézier curves).
|
getBackgroundColor, getBackgroundColorAsString, getBorderColor, getBorderColorAsString, getBorderWidth, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderWidthcheckValue, empty, getArrayValue, getNativeChart, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, keys, remove, remove, removeIfExists, setArrayValue, setArrayValue, setArrayValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, typeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBackgroundColorAsString, getBorderColorAsString, getBorderWidthpublic Filler getFiller()
HasFillpublic void setTension(double tension)
tension - the Bézier curve tension (0 for no Bézier curves).public double getTension()
getTension in interface IsDefaultLinepublic void setBorderCapStyle(CapStyle borderCapStyle)
borderCapStyle - how the end points of every line are drawn.public CapStyle getBorderCapStyle()
getBorderCapStyle in interface IsDefaultLinepublic 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 IsDefaultLinepublic void setBorderJoinStyle(JoinStyle borderJoinStyle)
borderJoinStyle - there are three possible values for this property: round, bevel and miter.public JoinStyle getBorderJoinStyle()
getBorderJoinStyle in interface IsDefaultLinepublic 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.isCapBezierPoints in interface IsDefaultLinetrue 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()
getCubicInterpolationMode in interface IsDefaultLine'default'.public void setFill(boolean fill)
public void setFill(IsFill fill)
public IsFill getFill()
getFill in interface IsDefaultLinegetFill in interface HasFillpublic 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 IsDefaultLinetrue to show the line as a stepped line (tension will be ignored).protected final Key getChildKey()
null if is a root element.protected final P getParent()
null if is a root element.protected final D getDefaultValues()
protected final void setEventToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
model - element where adding the function proxykey - property name to use to add the function proxyproxy - the function proxy instance to addprotected final void setCallbackToModel(org.pepstock.charba.client.options.AbstractModel<?,?> model,
Key key,
CallbackProxy.Proxy proxy)
model - element where adding the function proxykey - property name to use to add the function proxyproxy - the function proxy instance to addprotected final void checkAndAddToParent()