• Public
  • Public/Protected
  • All

Class SolidLine<FillType>

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:

SolidLine Usage:

Use SolidLine with:

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:




  • 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 ) })


    • props: Partial<LineStyleProperties<FillType>>

      Object containing any amount of SolidLine properties.

    Returns SolidLine


Readonly type

type : "linestyle"



  • getDefaultHighlightStyle(): this
  • Get automatically computed highlight style.

    Returns this

    LineStyle object


  • getFillStyle(): FillType
  • Get fill style of SolidLine.

    Returns FillType

    SolidFill object


  • getHighlightThicknessMultiplier(): number
  • Get highlighted line thickness multiplier.

    Returns number

    Line thickness multiplier.


  • getThickness(): number
  • Get thickness of SolidLine

    Returns number

    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
     solidfill => solidfill.setA( 80 )

    Type parameters


    • value: NewFillType | ImmutableMutator<FillType, NewFillType>

      Either a SolidFill object or a function, which will be used to create a new VisibleFill based on current value.

    Returns SolidLine<NewFillType>

    New SolidLine object


  • setHighlightThicknessMultiplier(value: number): this
  • 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.


    • value: number

      Amount to multiply the line thickness with when highlighted.

    Returns this


  • setThickness(thickness: number): this
  • 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: number

      Thickness as pixels.

    Returns this

Static Record

  • Record(defaultValues: TProps, name?: undefined | string): Factory<TProps>
  • 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.

    Type parameters

    • TProps


    • defaultValues: TProps
    • name: undefined | string

    Returns Factory<TProps>