MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / getPointXY

Function getPointXY

src/interaction/findNearestPoint.ts:59–62  ·  view source on GitHub ↗
(p: DataPoint)

Source from the content-addressed store, hash-verified

57const isTupleDataPoint = (p: DataPoint): p is DataPointTuple => Array.isArray(p);
58
59const getPointXY = (p: DataPoint): { readonly x: number; readonly y: number } => {
60 if (isTupleDataPoint(p)) return { x: p[0], y: p[1] };
61 return { x: p.x, y: p.y };
62};
63
64const getPointSizeCssPx = (p: DataPoint): number | null => {
65 if (isTupleDataPoint(p)) {

Callers 5

computeBarCategoryStepFunction · 0.70
computeCategoryWidthPxFunction · 0.70
findNearestPointFunction · 0.70

Calls 1

isTupleDataPointFunction · 0.70

Tested by

no test coverage detected