Skip to main content

Type Alias: NormalizationSpec

NormalizationSpec = { numeratorLabel?: string; type: "raw"; } | { denominatorLabel: string; numeratorLabel: string; type: "ratio"; } | { denominatorLabel: string; numeratorLabel: string; type: "percentage"; } | { denominatorLabel: string; numeratorLabel: string; rateBase: number; type: "rate"; }

Defined in: spec/types.legend.ts:137

Describes the statistical normalisation applied to the mapped data values. This metadata is used to enrich legend bin labels when extended: true is set on the labelFormat spec.

Union Members​

Type Literal​

{ numeratorLabel?: string; type: "raw"; }

numeratorLabel?​

optional numeratorLabel?: string

Optional unit label appended when extended: true.

type​

type: "raw"


Type Literal​

{ denominatorLabel: string; numeratorLabel: string; type: "ratio"; }


Type Literal​

{ denominatorLabel: string; numeratorLabel: string; type: "percentage"; }


Type Literal​

{ denominatorLabel: string; numeratorLabel: string; rateBase: number; type: "rate"; }

denominatorLabel​

denominatorLabel: string

numeratorLabel​

numeratorLabel: string

rateBase​

rateBase: number

The population base, e.g. 100000 for "cases per 100k inhabitants".

type​

type: "rate"