Skip to content

Interface: LineOptions ​

Defined in: layers/line.ts:15

Properties ​

color? ​

ts
optional color?: string | Color;

Defined in: layers/line.ts:18


dash? ​

ts
optional dash?: number[];

Defined in: layers/line.ts:43

Dash pattern in CSS pixels, alternating on/off lengths (Canvas setLineDash semantics) — e.g. [6, 4]. Up to 8 entries. Dashing turns decimation off, since a dashed line is a low-point-count annotation.


decimate? ​

ts
optional decimate?: boolean;

Defined in: layers/line.ts:48

Min/max decimate very large series to ~2 points per pixel column when zoomed out (preserves peaks). Requires monotonic x; auto-detected. Default true.


join? ​

ts
optional join?: LineJoin;

Defined in: layers/line.ts:31

How segments meet at each vertex:

  • round (default) — round caps and joins via an SDF; no seams.
  • miter — sharp mitered corners, clamped to LineOptions.miterLimit.
  • bevel — corners cut flat.
  • butt — flat ends with no join fill (segments may gap at sharp angles).

miterLimit? ​

ts
optional miterLimit?: number;

Defined in: layers/line.ts:37

For join: "miter", the max ratio of miter length to half line-width before a corner falls back to a bevel (prevents spikes at very sharp angles). Default 4.


name? ​

ts
optional name?: string;

Defined in: layers/line.ts:21


renderType? ​

ts
optional renderType?: RenderType;

Defined in: layers/line.ts:50

Buffer-usage hint; set "dynamic" when streaming via setData. Default "static".


step? ​

ts
optional step?: "before" | "after" | "center";

Defined in: layers/line.ts:23


width? ​

ts
optional width?: number;

Defined in: layers/line.ts:20

Line width in CSS pixels (real thickness via GPU triangle expansion).


x ​

ts
x: ArrayLike<number>;

Defined in: layers/line.ts:16


y ​

ts
y: ArrayLike<number>;

Defined in: layers/line.ts:17


yAxis? ​

ts
optional yAxis?: string;

Defined in: layers/line.ts:22

MIT licensed. WebGL2 required.