public class Line extends AbstractElement<IsDefaultLine> implements IsDefaultLine, HasFill
Modifier | Constructor and Description |
---|---|
protected |
Line(Elements elements,
Key childKey,
IsDefaultLine defaultValues,
NativeObject nativeObject)
Creates the object with the parent, the key of this element, default values and native object to map java script properties.
|
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.
|
double |
getBorderDashOffset()
Returns the line dash pattern offset.
|
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).
|
CubicInterpolationMode |
getCubicInterpolationMode()
Returns algorithm used to interpolate a smooth curve from the discrete data points.
|
FillHandler |
getFillHandler()
Returns a fill handler instance to use in the default methods of this interface.
|
Stepped |
getStepped()
Returns if the line is shown as a stepped line.
|
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 |
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(double borderDashOffset)
Sets the line dash pattern offset.
|
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 |
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 |
setStepped(boolean line)
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(Stepped line)
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 |
setTension(double tension)
Returns the Bézier curve tension (0 for no Bézier curves).
|
getBackgroundColor, getBackgroundColorAsString, getBorderColor, getBorderColorAsString, getBorderWidth, getHoverBackgroundColor, getHoverBackgroundColorAsString, getHoverBorderColor, getHoverBorderColorAsString, getHoverBorderWidth, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderWidth, setHoverBackgroundColor, setHoverBackgroundColor, setHoverBorderColor, setHoverBorderColor, setHoverBorderWidth
getDefaultValues, getParent, loadPadding, setCallbackToModel, setCallbackToModel, setEventToModel
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, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBackgroundColorAsString, getBorderColorAsString, getBorderWidth, getHoverBackgroundColorAsString, getHoverBorderColorAsString, getHoverBorderWidth
protected Line(Elements elements, Key childKey, IsDefaultLine defaultValues, NativeObject nativeObject)
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 propertiespublic FillHandler getFillHandler()
HasFill
getFillHandler
in interface HasFill
public void setTension(double tension)
tension
- the Bézier curve tension (0 for no Bézier 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(double borderDashOffset)
borderDashOffset
- the line dash pattern offset.public double getBorderDashOffset()
getBorderDashOffset
in interface IsDefaultLine
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()
getBorderJoinStyle
in interface IsDefaultLine
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.isCapBezierPoints
in interface IsDefaultLine
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()
getCubicInterpolationMode
in interface IsDefaultLine
public void setStepped(boolean line)
line
- if the line is shown as a stepped line. false
is no step interpolationpublic void setStepped(Stepped line)
line
- if the line is shown as a stepped line.public Stepped getStepped()
getStepped
in interface IsDefaultLine