Interface: TooltipItem<TType>

Type parameters

NameType
TTypeextends ChartType

Properties

chart

chart: Chart<"bar" | "line" | "scatter" | "bubble" | "pie" | "doughnut" | "polarArea" | "radar", (number | ScatterDataPoint | BubbleDataPoint)[], unknown>

The chart the tooltip is being shown on

Defined in

index.esm.d.ts:2625TooltipItem - 图1 (opens new window)


dataIndex

dataIndex: number

Index of this data item in the dataset

Defined in

index.esm.d.ts:2660TooltipItem - 图2 (opens new window)


dataset

dataset: ChartDataset<"bar" | "line" | "scatter" | "bubble" | "pie" | "doughnut" | "polarArea" | "radar", (number | ScatterDataPoint | BubbleDataPoint)[]>

The dataset the item comes from

Defined in

index.esm.d.ts:2650TooltipItem - 图3 (opens new window)


datasetIndex

datasetIndex: number

Index of the dataset the item comes from

Defined in

index.esm.d.ts:2655TooltipItem - 图4 (opens new window)


element

element: Element<Object, Object>

The chart element (point, arc, bar, etc.) for this tooltip item

Defined in

index.esm.d.ts:2665TooltipItem - 图5 (opens new window)


formattedValue

formattedValue: string

Formatted value for the tooltip

Defined in

index.esm.d.ts:2645TooltipItem - 图6 (opens new window)


label

label: string

Label for the tooltip

Defined in

index.esm.d.ts:2630TooltipItem - 图7 (opens new window)


parsed

parsed: UnionToIntersection<ParsedDataType<TType>>

Parsed data values for the given dataIndex and datasetIndex

Defined in

index.esm.d.ts:2635TooltipItem - 图8 (opens new window)


raw

raw: unknown

Raw data values for the given dataIndex and datasetIndex

Defined in

index.esm.d.ts:2640TooltipItem - 图9 (opens new window)