API / Configuration / ChartTooltip

Defined in: src/types/chart/tooltip.ts:156

Type Parameters

Type Parameter Default type
T MeaningfulAny

Properties

Property Type Description
enabled? boolean -
headerFormat? CustomFormat | ValueFormat Formatting settings for tooltip header row.
pin? object -
pin.enabled? boolean -
pin.modifierKey? "altKey" | "metaKey" -
qa? string Can be used for the UI automated test. It is assigned as a data-qa attribute to an element.
renderer? (args: ChartTooltipRendererArgs<T>) => null | ReactElement Specifies the renderer for the tooltip. If returned null default tooltip renderer will be used.
rowRenderer? null | (args) => string | ReactElement Defines the way a single data/series is displayed (corresponding to a separate selected point/ruler/shape on the chart). It is useful in cases where you need to display additional information, but keep the general format of the tooltip. If a string is returned, it will be interpreted as raw HTML and inserted without escaping.
sorting? { direction: "asc" | "desc"; key: "value"; } | ChartTooltipSortComparator<T> Controls the order of tooltip rows. Applied to hovered before rendering. Use a custom comparator (a, b) => number for arbitrary ordering.
throttle? number Show tooltip at most once per every throttle milliseconds
totals? object Settings for totals block in tooltip
totals.aggregation? "sum" | (args) => ChartTooltipTotalsAggregationValue The aggregation method for calculating totals. It can be a built-in function (e.g., 'sum') or a custom function. Default 'sum'
totals.enabled? boolean Enables/disables the display of totals Default false
totals.label? string The label text for the totals. For built-in aggregations, the label can be omitted.
totals.valueFormat? ValueFormat Formatting settings for totals tooltip value.
valueFormat? ValueFormat Formatting settings for tooltip value.