Constructors
Methods
Static
clipLine
- clipLine(
p1x: number,
p1y: number,
p2x: number,
p2y: number,
rect: Bounds,
): false | [x: number, y: number, x2: number, y2: number, shift: number] Parameters
- p1x: number
- p1y: number
- p2x: number
- p2y: number
- rect: Bounds
Returns false | [x: number, y: number, x2: number, y2: number, shift: number]
Static
clipLineX
- clipLineX(
p1x: number,
p1y: number,
p2x: number,
p2y: number,
rx1: number,
rx2: number,
): [number, number, number, number] Parameters
- p1x: number
- p1y: number
- p2x: number
- p2y: number
- rx1: number
- rx2: number
Returns [number, number, number, number]
Static
clipPolygon
- clipPolygon(
points: [number, number][],
rect: Bounds,
): false | [number, number][] Parameters
- points: [number, number][]
- rect: Bounds
Returns false | [number, number][]
Static
convexHull
- convexHull<HullPoint extends { x: number; y: number }>(
points: HullPoint[],
): HullPoint[] Type Parameters
- HullPoint extends { x: number; y: number }
Static
intersectionLineLine
- intersectionLineLine(
x1: number,
y1: number,
x2: number,
y2: number,
x3: number,
y3: number,
x4: number,
y4: number,
): { x: number; y: number } Parameters
- x1: number
- y1: number
- x2: number
- y2: number
- x3: number
- y3: number
- x4: number
- y4: number
Returns { x: number; y: number }
Static
lineIntersectsLine
- lineIntersectsLine(
x1: number,
y1: number,
x2: number,
y2: number,
x3: number,
y3: number,
x4: number,
y4: number,
): boolean Parameters
- x1: number
- y1: number
- x2: number
- y2: number
- x3: number
- y3: number
- x4: number
- y4: number
Returns boolean
Static
pointInPolygon
- pointInPolygon(
x: number,
y: number,
points: { x: number; y: number }[],
): boolean Parameters
- x: number
- y: number
- points: { x: number; y: number }[]
Returns boolean
Static
pointInRect
- pointInRect(
x: number,
y: number,
rect: Bounds | { right: number; top: number; x: number; y: number },
): boolean Parameters
- x: number
- y: number
- rect: Bounds | { right: number; top: number; x: number; y: number }
Returns boolean
Static
pointOnLine
- pointOnLine(
x0: number,
y0: number,
x1: number,
y1: number,
x2: number,
y2: number,
range: number,
): boolean Parameters
- x0: number
- y0: number
- x1: number
- y1: number
- x2: number
- y2: number
- range: number
Returns boolean
Static
rectInRect
- rectInRect<
Rectangle extends { right: number; top: number; x: number; y: number },
>(
rect1: Bounds | Rectangle,
rect2: Bounds | Rectangle,
): boolean Type Parameters
- Rectangle extends { right: number; top: number; x: number; y: number }
Returns boolean
a collection of mathematical utility functions used by the chart classes