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

Function normalizeSamplingMode

examples/sampling/main.ts:65–76  ·  view source on GitHub ↗
(value: string | null)

Source from the content-addressed store, hash-verified

63};
64
65const normalizeSamplingMode = (value: string | null): SeriesSampling => {
66 switch (value) {
67 case 'none':
68 case 'lttb':
69 case 'average':
70 case 'max':
71 case 'min':
72 return value;
73 default:
74 return 'lttb';
75 }
76};
77
78const normalizeThreshold = (value: string | null): number => {
79 const n = Number(value);

Callers 1

applyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected