MCPcopy
hub / github.com/PostHog/posthog / apiValueToMathType

Function apiValueToMathType

frontend/src/scenes/trends/mathsLogic.tsx:260–266  ·  view source on GitHub ↗
(math: string | undefined, groupTypeIndex: number | null | undefined)

Source from the content-addressed store, hash-verified

258}
259/** Serialize a math selector value. Inverse of mathTypeToApiValues. */
260export function apiValueToMathType(math: string | undefined, groupTypeIndex: number | null | undefined): string {
261 let assembledMath = math || BaseMathType.TotalCount
262 if (math === 'unique_group') {
263 assembledMath += `::${groupTypeIndex}`
264 }
265 return assembledMath
266}
267
268export const mathsLogic = kea<mathsLogicType>({
269 path: ['scenes', 'trends', 'mathsLogic'],

Callers 4

summarizeInsightFiltersFunction · 0.90
MathSelectorFunction · 0.90
SeriesDisplayFunction · 0.90
mathsLogic.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…