Class Line
- Direct Known Subclasses:
RadarLine
Line elements are used to represent the line in a line chart.
When set, these options apply to all objects of that type unless specifically overridden by the configuration attached to a dataset.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFill()
setBackgroundColor
(Color backgroundColor) Default line fill colorsetBorderCapStyle
(BorderCapStyle borderCapStyle) Default line cap style.setBorderColor
(Color borderColor) Default line stroke colorsetBorderDash
(List<Integer> borderDash) Default line dash.setBorderDashOffset
(Float borderDashOffset) Default line dash offset.setBorderJoinStyle
(BorderJoinStyle borderJoinStyle) Default line join style.setBorderWidth
(Integer borderWidth) Default line stroke widthsetCapBezierPoints
(Boolean capBezierPoints) If true, bezier control points are kept inside the chart.If true, the line is filled.setStepped
(Boolean stepped) If true, the line is shown as a steeped line and 'tension' will be ignoredsetTension
(Float tension) Default bezier curve tension.
-
Constructor Details
-
Line
public Line()
-
-
Method Details
-
getTension
- See Also:
-
setTension
Default bezier curve tension. Set to 0 for no bezier curves.
Default
0.4
-
getBackgroundColor
- See Also:
-
setBackgroundColor
Default line fill color
Default
'rgba(0,0,0,0.1)'
-
getBorderWidth
- See Also:
-
setBorderWidth
Default line stroke width
Default
3
-
getBorderColor
- See Also:
-
setBorderColor
Default line stroke color
Default
'rgba(0,0,0,0.1)'
-
getBorderCapStyle
- See Also:
-
setBorderCapStyle
Default line cap style.
butt
The ends of lines are squared off at the endpoints.round
The ends of lines are rounded.square
The ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness.
Default
'butt'
-
getBorderDash
- See Also:
-
setBorderDash
Default line dash.
A list of numbers that specifies distances to alternately draw a line and a gap (in coordinate space units). If the number of elements in the array is odd, the elements of the array get copied and concatenated. For example, [5, 15, 25] will become [5, 15, 25, 5, 15, 25].
Default
[]
-
getBorderDashOffset
- See Also:
-
setBorderDashOffset
Default line dash offset. A float specifying the amount of the offset. Initially 0.0.
Default
0.0
-
getBorderJoinStyle
- See Also:
-
setBorderJoinStyle
Default line join style.
round
Rounds off the corners of a shape by filling an additional sector of disc centered at the common endpoint of connected segments. The radius for these rounded corners is equal to the line width.bevel
Fills an additional triangular area between the common endpoint of connected segments, and the separate outside rectangular corners of each segment.miter
Connected segments are joined by extending their outside edges to connect at a single point, with the effect of filling an additional lozenge-shaped area. This setting is effected by the miterLimit property.
Default
'miter'
-
getCapBezierPoints
- See Also:
-
setCapBezierPoints
If true, bezier control points are kept inside the chart. If false, no restriction is enforced.
Default
true
-
getFill
- See Also:
-
setFill
If true, the line is filled.
Default
true
-
getStepped
- See Also:
-
setStepped
If true, the line is shown as a steeped line and 'tension' will be ignored
Default
false
-