MCPcopy Create free account
hub / github.com/ChartGPU/ChartGPU / getPointXY

Function getPointXY

src/renderers/createScatterRenderer.ts:52–55  ·  view source on GitHub ↗
(point: DataPoint)

Source from the content-addressed store, hash-verified

50const isTupleDataPoint = (point: DataPoint): point is DataPointTuple => Array.isArray(point);
51
52const getPointXY = (point: DataPoint): { readonly x: number; readonly y: number } => {
53 if (isTupleDataPoint(point)) return { x: point[0], y: point[1] };
54 return { x: point.x, y: point.y };
55};
56
57const getPointSizeCssPx = (point: DataPoint): number | null => {
58 if (isTupleDataPoint(point)) {

Callers 2

computeDataBoundsFunction · 0.70
prepareFunction · 0.70

Calls 1

isTupleDataPointFunction · 0.70

Tested by

no test coverage detected