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

Function normalizeSampling

src/config/OptionResolver.ts:499–505  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

497};
498
499const normalizeSampling = (value: unknown): SeriesSampling | undefined => {
500 if (typeof value !== 'string') return undefined;
501 const v = value.trim().toLowerCase();
502 return v === 'none' || v === 'lttb' || v === 'average' || v === 'max' || v === 'min' || v === 'ohlc'
503 ? (v as SeriesSampling)
504 : undefined;
505};
506
507const normalizeScatterMode = (value: unknown): NonNullable<ScatterSeriesConfig['mode']> | undefined => {
508 if (typeof value !== 'string') return undefined;

Callers 1

resolveOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected