UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

29 lines 985 B
import type { CurveType } from "../../models/curve.js"; /** * Build the curve segments for a set of pixel-coordinate points * using d3's curve factory, then evaluate y at the given pixel x. * * Returns null if targetX is outside the curve's x range. */ export declare function evaluateCurveY(points: Array<{ x: number; y: number; }>, targetX: number, curveType?: CurveType): number | null; /** * Build the curve segments for a set of pixel-coordinate points using d3's curve factory, * then evaluate the point on the curve at the given angle. * * Returns null if no point on the curve matches the target angle. */ export declare function evaluateCurveAtAngle( /** * The points only uses the x/y coordinate system, because internally curve factory only works with x/y coordinates. * So angles/radius are lost during the curve generation. */ points: Array<{ x: number; y: number; }>, targetAngle: number, curveType?: CurveType): { x: number; y: number; } | null;