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

Function getRuntimeHitTestSeries

src/ChartGPU.ts:521–532  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

519 };
520
521 const getRuntimeHitTestSeries = (): ResolvedChartGPUOptions['series'] => {
522 if (runtimeHitTestSeriesCache) return runtimeHitTestSeriesCache;
523 // Replace cartesian series `data` with chart-owned runtime data (pie series are unchanged).
524 runtimeHitTestSeriesCache = resolvedOptions.series.map((s, i) => {
525 if (s.type === 'pie') return s;
526 if (s.type === 'candlestick') {
527 return { ...s, data: runtimeRawDataByIndex[i] ?? (s.data as ReadonlyArray<OHLCDataPoint>) };
528 }
529 return { ...s, data: runtimeRawDataByIndex[i] ?? (s.data as ReadonlyArray<DataPoint>) };
530 }) as ResolvedChartGPUOptions['series'];
531 return runtimeHitTestSeriesCache;
532 };
533
534 initRuntimeHitTestStoreFromResolvedOptions();
535

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected