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)
Optional
props: Partial<Omit<SolidLineStyleProperties, "type" | "lineType">>Object containing any amount of SolidLine properties.
Readonly
fillLine fill style.
Readonly
lineReadonly
thicknessLine 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.
Default value: 1.
Readonly
typeConstruct 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 )
)
New SolidLine object
Either a SolidFill object or a function, which will be used to create a new VisibleFill based on current value.
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.
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. The supported fillStyles vary per component.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 <- colorRelated information:
For more line styles, see: