Documentation

@kanunilabs/datagrid-react-enterprise


@kanunilabs/datagrid-react-enterprise / SparklineOptions

Interface: SparklineOptions

Extends

  • Omit<SparklineGeometryOptions, "horizontal">

Extended by

Properties

ariaLabel?

optional ariaLabel?: string

Screen-reader description. Falls back to the grid dictionary's summary.


color?

optional color?: string

Series colour. Default: the theme's primary colour.


fillOpacity?

optional fillOpacity?: number


highlight?

optional highlight?: object

Mark the first, lowest and/or highest reading too (see ColumnSparkline).

first?

optional first?: boolean

max?

optional max?: boolean

min?

optional min?: boolean


labels?

optional labels?: boolean

Each bar's value beside it (bar types).


lineDashed?

optional lineDashed?: boolean


lineWidth?

optional lineWidth?: number

Line thickness (1–6 px), dashed line and area opacity — see ColumnSparkline.


locale?

optional locale?: string

Number formatting for the tooltip and the summary.


markers?

optional markers?: boolean

A dot on every reading of a line or area.


max?

optional max?: number

Force the high end.

Inherited from

Omit.max


min?

optional min?: number

Force the low end of the scale — for comparing rows against each other.

Inherited from

Omit.min


negativeColor?

optional negativeColor?: string

Colour of bars below zero. Default: the theme's danger colour.


pointColor?

optional pointColor?: (point) => string | null | undefined

A colour per reading, or nothing for the default (see ColumnSparkline).

Parameters

point

SparklinePointInfo<any>

Returns

string | null | undefined


row?

optional row?: unknown

The row the sparkline is drawn in, handed to pointColor and tooltipText.


showBaseline?

optional showBaseline?: boolean

Draw the zero line when the series crosses it. Default true for bar.


showLast?

optional showLast?: boolean

Mark the last reading with a dot. Default true for line/area.

It is the point the reader is actually after — "where did it end up" — and a line without it makes them find the right edge themselves.


tooltip?

optional tooltip?: boolean

Hover a reading to see its value (a native tooltip). Default off.


tooltipText?

optional tooltipText?: (point) => string

The tooltip's text per reading, with the row; turns tooltips on.

Parameters

point

SparklinePointInfo<any>

Returns

string


type?

optional type?: SparklineType


valueFormat?

optional valueFormat?: NumberFormatOptions

How values print: labels, tooltip, summary ({ style: 'percent' }…).


xKey?

optional xKey?: string

When the readings are objects, the fields holding x and y (default 'x' and 'y'). [x, y] pairs need no keys (§E.6 #82).

Inherited from

Omit.xKey


yKey?

optional yKey?: string

Inherited from

Omit.yKey