Skip to content

charton API


charton API / @chart-on/core / index / crispLine

Function: crispLine() ​

crispLine(ctx, x0, y0, x1, y1, lineWidth, pixelRatio): void

Defined in: packages/core/src/primitives.ts:320

Stroke a horizontal or vertical line snapped to device pixels.

Parameters ​

ctx ​

CanvasRenderingContext2D

x0 ​

number

y0 ​

number

x1 ​

number

y1 ​

number

lineWidth ​

number

pixelRatio ​

number

Returns ​

void