Skip to content

grafit-charts


Type Alias: AnnotationOptions

AnnotationOptions = { label?: LineAnnotationLabel; lineDash?: Pixels[]; stroke?: ColorValue; strokeWidth?: Pixels; type: "horizontal-line"; value: number | ComputedAnnotationValue; } | { label?: LineAnnotationLabel; lineDash?: Pixels[]; stroke?: ColorValue; strokeWidth?: Pixels; type: "vertical-line"; value: unknown | ComputedAnnotationValue; } | { end: { x: unknown; y: number; }; lineDash?: Pixels[]; start: { x: unknown; y: number; }; stroke?: ColorValue; strokeWidth?: Pixels; type: "line"; } | { color?: ColorValue; fontSize?: Pixels; text: string; type: "text"; x: unknown; y: number; } | { axis: "x" | "y"; fill?: ColorValue; fillOpacity?: number; label?: AnnotationLabel; range: [unknown | ComputedAnnotationValue, unknown | ComputedAnnotationValue]; type: "range"; }

Union Members

Type Literal

{ label?: LineAnnotationLabel; lineDash?: Pixels[]; stroke?: ColorValue; strokeWidth?: Pixels; type: "horizontal-line"; value: number | ComputedAnnotationValue; }

label?

optional label?: LineAnnotationLabel

lineDash?

optional lineDash?: Pixels[]

stroke?

optional stroke?: ColorValue

strokeWidth?

optional strokeWidth?: Pixels

type

type: "horizontal-line"

value

value: number | ComputedAnnotationValue

A level, or the statistic that decides it: { stat: 'mean', field: 'price' }.


Type Literal

{ label?: LineAnnotationLabel; lineDash?: Pixels[]; stroke?: ColorValue; strokeWidth?: Pixels; type: "vertical-line"; value: unknown | ComputedAnnotationValue; }

label?

optional label?: LineAnnotationLabel

lineDash?

optional lineDash?: Pixels[]

stroke?

optional stroke?: ColorValue

strokeWidth?

optional strokeWidth?: Pixels

type

type: "vertical-line"

value

value: unknown | ComputedAnnotationValue

A category, a date, a number — or a statistic over a field.


Type Literal

{ end: { x: unknown; y: number; }; lineDash?: Pixels[]; start: { x: unknown; y: number; }; stroke?: ColorValue; strokeWidth?: Pixels; type: "line"; }


Type Literal

{ color?: ColorValue; fontSize?: Pixels; text: string; type: "text"; x: unknown; y: number; }


Type Literal

{ axis: "x" | "y"; fill?: ColorValue; fillOpacity?: number; label?: AnnotationLabel; range: [unknown | ComputedAnnotationValue, unknown | ComputedAnnotationValue]; type: "range"; }

axis

axis: "x" | "y"

fill?

optional fill?: ColorValue

fillOpacity?

optional fillOpacity?: number

label?

optional label?: AnnotationLabel

range

range: [unknown | ComputedAnnotationValue, unknown | ComputedAnnotationValue]

Both ends take a statistic too: [{ stat: 'percentile', percentile: 5, … }, …].

type

type: "range"