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

Function isTupleDataPoint

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

Source from the content-addressed store, hash-verified

110): ChartGPUOptions => {
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;

Callers 1

getXFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected