(p: DataPoint)
| 159 | const isTupleOHLCDataPoint = (p: OHLCDataPoint): p is OHLCDataPointTuple => Array.isArray(p); |
| 160 | |
| 161 | const getPointXY = (p: DataPoint): { readonly x: number; readonly y: number } => { |
| 162 | if (isTupleDataPoint(p)) return { x: p[0], y: p[1] }; |
| 163 | return { x: p.x, y: p.y }; |
| 164 | }; |
| 165 | |
| 166 | const getOHLCTimestamp = (p: OHLCDataPoint): number => (isTupleOHLCDataPoint(p) ? p[0] : p.timestamp); |
| 167 | const getOHLCClose = (p: OHLCDataPoint): number => (isTupleOHLCDataPoint(p) ? p[2] : p.close); |
no test coverage detected