Skip to main content

Signature

A LineFill shades the region between two existing Line entity handles. The source lines are specified at creation time and cannot be changed afterwards - to retarget, delete the fill and create a new one.

Quick example

Options

string
required
Unique slot key for this fill.
handle
required
Handle returned by the first Line() call.
handle
required
Handle returned by the second Line() call.
string
Fill color as #RRGGBBAA. Use low alpha (e.g. #22c55e30) for zone shading.

Source line immutability

The source line keys (lineA and lineB) are fixed at construction time. You cannot retarget a LineFill to different lines after creation. To change which lines a fill references, delete the fill and recreate it.

forceOverlay constraint

Both source lines must have the same forceOverlay value. Mixing forceOverlay: true and forceOverlay: false lines in a single LineFill raises an error at construction time.
The forceOverlay constraint is checked when the LineFill is constructed, not when it is rendered. If the source lines have mismatched forceOverlay settings, the LineFill will fail silently (not rendered) and log a warning.

Handle methods

Bollinger Bands fill example

Line

Line entity - both source lines for LineFill must be Line handles.

fill() primitive

fill() shades between two plot series (not Line entities).

Bollinger Bands example

Full working BB with LineFill shading.