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

Function getX

examples/interactive/main.ts:113–113  ·  view source on GitHub ↗
(p: DataPoint)

Source from the content-addressed store, hash-verified

111 type DataPointTupleLocal = readonly [x: number, y: number, size?: number];
112 const isTupleDataPoint = (p: DataPoint): p is DataPointTupleLocal => Array.isArray(p) && p.length >= 2;
113 const getX = (p: DataPoint): number => (isTupleDataPoint(p) ? p[0] : p.x);
114 const first = seriesA[0];
115 const last = seriesA.length > 0 ? seriesA[seriesA.length - 1] : undefined;
116 const xMin = first ? getX(first) : Date.now();

Callers 1

createOptionsFunction · 0.85

Calls 1

isTupleDataPointFunction · 0.70

Tested by

no test coverage detected