Skip to main content

Type Alias: Decoration<Row>

Decoration<Row> = { text: string; type: "title"; } | { text: string; type: "subtitle"; } | { date?: string; dateStyle?: TextStyle; kicker?: string; kickerStyle?: TextStyle; subtitle?: string; subtitleStyle?: TextStyle; title: string; titleStyle?: TextStyle; type: "titleHeader"; } | { html: string; type: "sourceNote"; unsafe?: boolean; } | { align: Align; bottom?: string; ruleColor?: string; ruleWidth: number; size: number; top?: string; type: "caption538"; } | { key: keyof Row & string; type: "groupBy"; } | { color: string; start: 1 | 2; type: "groupStripes"; } | { hide: boolean; key: keyof Row & string; naColor: string; palette?: Readonly<Record<string, string>> | readonly string[]; rows?: RowSelector<Row>; side: "left" | "right"; type: "rowAccent"; width: number; } | { highlightColor?: string; rows: RowSelector<Row>; textColor: string; type: "boldRows"; } | { accentColor?: string; accentWidth: number; bold: boolean; columns?: readonly keyof Row & string[]; dimColor: string | "auto" | null; fill?: string; rows: RowSelector<Row>; textColor?: string; type: "spotlight"; } | { after: readonly number[]; color: string; gap: readonly number[]; label?: readonly (string | null)[]; labelColor?: string; labelPosition: "above" | "below"; labelSize: number; style: "dashed" | "solid" | "dotted"; type: "cutline"; weight: number; } | { color: string; includeLabels: boolean; type: "borderGrid"; weight: number; } | { barAlign: Align; barHeight: number; barWidth: string; colors: readonly string[]; img?: string; imgAlign: "left" | "right"; imgHeight: number; imgPadding: number; imgWidth: number; side: "top" | "bottom"; text?: string; textAlign: Align; textColor: string; textPadding: number; textSize: number; textWeight: string; type: "borderBars"; } | { columns?: readonly keyof Row & string[]; digits: number; domain?: readonly [number, number]; labels?: readonly string[]; location: "top" | "bottom"; nBins: number; palette?: readonly string[]; reverse?: boolean; swatchHeight: number; swatchWidth: number; title?: string; titlePosition: "top" | "left"; type: "legendContinuous"; } | { align: Align; border: boolean; borderColor?: string; direction: "horizontal" | "vertical"; gap: number; heading?: string; key: Readonly<Record<string, string>> | "recorded"; location: "top" | "bottom"; shape: "square" | "circle"; subtitle?: string; swatchSize: number; type: "legendDiscrete"; } | { hideP: boolean; levels: readonly number[]; note: boolean; pairs: readonly object[]; superscript: boolean; symbols: readonly string[]; type: "significance"; } | { bold: boolean; bounds?: readonly [number | null, number | null]; color?: string; columns: readonly keyof Row & string[]; fill?: string; method: "iqr" | "sd" | "bounds"; note?: string | boolean; side: "both" | "high" | "low"; symbol?: string; threshold?: number; type: "outliers"; } | { columns: readonly keyof Row & string[]; decimals: number; divisor: number; labelSuffix?: string; note?: string; type: "scaleNote"; where: "sourceNote" | "label" | "both"; } | { accounts: Readonly<Record<string, string>>; align: Align; caption?: string; iconColor?: string; iconHeight: string; separator: string; stack: boolean; type: "socialTag"; } | { angle: number; color: string; font: string; image?: string; opacity: number; position: string; size: string; text?: string; type: "watermark"; } | { balance: boolean; columns?: readonly keyof Row & string[]; type: "wrapLabels"; width: number; } | { align: Align; color?: string; columns: readonly keyof Row & string[]; italic: boolean; label: string; rule: boolean; ruleColor?: string; size: string; type: "marginalia"; width?: number | string; } | { cleanGaps: boolean; fill: string; gap: number; nCols: number; rowsPerCol?: number; type: "snake"; } | { colors?: readonly string[]; imageColumns: readonly keyof Row & string[]; imgHeight: string; levels: readonly string[]; style: "light" | "dark"; tierKey: keyof Row & string; type: "tiers"; } | { family: string; google: boolean; style?: "normal" | "italic"; type: "font"; weight?: number | string; }

Defined in: packages/sdvtables/src/spec.ts:243

Type Parameters​

Row​

Row

Union Members​

Type Literal​

{ text: string; type: "title"; }


Type Literal​

{ text: string; type: "subtitle"; }


Type Literal​

{ date?: string; dateStyle?: TextStyle; kicker?: string; kickerStyle?: TextStyle; subtitle?: string; subtitleStyle?: TextStyle; title: string; titleStyle?: TextStyle; type: "titleHeader"; }


Type Literal​

{ html: string; type: "sourceNote"; unsafe?: boolean; }


Type Literal​

{ align: Align; bottom?: string; ruleColor?: string; ruleWidth: number; size: number; top?: string; type: "caption538"; }


Type Literal​

{ key: keyof Row & string; type: "groupBy"; }


Type Literal​

{ color: string; start: 1 | 2; type: "groupStripes"; }


Type Literal​

{ hide: boolean; key: keyof Row & string; naColor: string; palette?: Readonly<Record<string, string>> | readonly string[]; rows?: RowSelector<Row>; side: "left" | "right"; type: "rowAccent"; width: number; }


Type Literal​

{ highlightColor?: string; rows: RowSelector<Row>; textColor: string; type: "boldRows"; }


Type Literal​

{ accentColor?: string; accentWidth: number; bold: boolean; columns?: readonly keyof Row & string[]; dimColor: string | "auto" | null; fill?: string; rows: RowSelector<Row>; textColor?: string; type: "spotlight"; }


Type Literal​

{ after: readonly number[]; color: string; gap: readonly number[]; label?: readonly (string | null)[]; labelColor?: string; labelPosition: "above" | "below"; labelSize: number; style: "dashed" | "solid" | "dotted"; type: "cutline"; weight: number; }

after = rows above each line (Python gt_cutline, _cells.py:840-841): 3 draws between the 3rd and 4th rows, 0 above the first.


Type Literal​

{ color: string; includeLabels: boolean; type: "borderGrid"; weight: number; }


Type Literal​

{ barAlign: Align; barHeight: number; barWidth: string; colors: readonly string[]; img?: string; imgAlign: "left" | "right"; imgHeight: number; imgPadding: number; imgWidth: number; side: "top" | "bottom"; text?: string; textAlign: Align; textColor: string; textPadding: number; textSize: number; textWeight: string; type: "borderBars"; }


Type Literal​

{ columns?: readonly keyof Row & string[]; digits: number; domain?: readonly [number, number]; labels?: readonly string[]; location: "top" | "bottom"; nBins: number; palette?: readonly string[]; reverse?: boolean; swatchHeight: number; swatchWidth: number; title?: string; titlePosition: "top" | "left"; type: "legendContinuous"; }


Type Literal​

{ align: Align; border: boolean; borderColor?: string; direction: "horizontal" | "vertical"; gap: number; heading?: string; key: Readonly<Record<string, string>> | "recorded"; location: "top" | "bottom"; shape: "square" | "circle"; subtitle?: string; swatchSize: number; type: "legendDiscrete"; }


Type Literal​

{ hideP: boolean; levels: readonly number[]; note: boolean; pairs: readonly object[]; superscript: boolean; symbols: readonly string[]; type: "significance"; }


Type Literal​

{ bold: boolean; bounds?: readonly [number | null, number | null]; color?: string; columns: readonly keyof Row & string[]; fill?: string; method: "iqr" | "sd" | "bounds"; note?: string | boolean; side: "both" | "high" | "low"; symbol?: string; threshold?: number; type: "outliers"; }


Type Literal​

{ columns: readonly keyof Row & string[]; decimals: number; divisor: number; labelSuffix?: string; note?: string; type: "scaleNote"; where: "sourceNote" | "label" | "both"; }


Type Literal​

{ accounts: Readonly<Record<string, string>>; align: Align; caption?: string; iconColor?: string; iconHeight: string; separator: string; stack: boolean; type: "socialTag"; }


Type Literal​

{ angle: number; color: string; font: string; image?: string; opacity: number; position: string; size: string; text?: string; type: "watermark"; }


Type Literal​

{ balance: boolean; columns?: readonly keyof Row & string[]; type: "wrapLabels"; width: number; }


Type Literal​

{ align: Align; color?: string; columns: readonly keyof Row & string[]; italic: boolean; label: string; rule: boolean; ruleColor?: string; size: string; type: "marginalia"; width?: number | string; }


Type Literal​

{ cleanGaps: boolean; fill: string; gap: number; nCols: number; rowsPerCol?: number; type: "snake"; }


Type Literal​

{ colors?: readonly string[]; imageColumns: readonly keyof Row & string[]; imgHeight: string; levels: readonly string[]; style: "light" | "dark"; tierKey: keyof Row & string; type: "tiers"; }


Type Literal​

{ family: string; google: boolean; style?: "normal" | "italic"; type: "font"; weight?: number | string; }