Construct a SolidLine object, specifying any amount of its properties.
// Example, 1px solid red line.
const solidRed = new SolidLine({
thickness: 1,
fillStyle: new SolidFill({ color: ColorRGBA( 255, 0, 0 ) })
})
LineSeries.setStrokeStyle(solidRed)
Object containing any amount of SolidLine properties.
Get automatically computed highlight style.
LineStyle object
Get fill style of SolidLine.
SolidFill object
Get highlighted line thickness multiplier.
Line thickness multiplier.
Get thickness of SolidLine
Thickness as pixels
Construct a new Visible line object based on this one, but with modified fill style.
Example (SolidFill):
// specify new fillstyle
solidLineStyle.setFillStyle( new SolidFill({
color: ColorHex('#F00')
}) )
// change fillstyle properties
solidLineStyle.setFillStyle(
solidfill => solidfill.setA( 80 )
)
Either a SolidFill object or a function, which will be used to create a new VisibleFill based on current value.
New SolidLine object
Construct a new SolidLine object based on this one, but with modified highlight thickness multiplier.
Only works when the highlighted style has not been set separately.
Amount to multiply the line thickness with when highlighted.
Construct a new SolidLine object based on this one, but with modified thickness.
-1 can be used to signify smallest available thickness. With most features, this will result in slightly better GPU performance, but less detailed line.
Thickness as pixels.
Unlike other types in Immutable.js, the Record()
function creates a new
Record Factory, which is a function that creates Record instances.
See above for examples of using Record()
.
Note: Record
is a factory function and not a class, and does not use the
new
keyword during construction.
Style class for describing a solid line.
Instances of SolidLine, like all LCJS style classes, are immutable, meaning that its setters don't modify the actual object, but instead return a completely new modified object.
Properties of SolidLine:
thickness
: thickness of line as pixels.fillStyle
: description of line fill color. Currently supported fill styles:SolidLine Usage:
Use SolidLine with:
setStrokeStyle
methods:Watch out! A common misuse is to attempt styling strokes or borders directly using fill style or color. Remember, when calling a
setStrokeStyle
method, a line style is expected! Carefully observe the order of wrapped styles: line style <- fill style <- color// Example, set line series stroke style to 1px solid red. LineSeries.setStrokeStyle(new SolidLine({ thickness: 1, fillStyle: new SolidFill({ color: ColorRGBA( 255, 0, 0 ) }) }))
Related information:
For more line styles, see: