---
id: "packages/active-charts/all-exports/interaction"
title: "Interaction"
description: "ChartValueRole, FlatPoint, SharedTooltipData, SingleTooltipData and 3 more: generated from the source of active-charts."
url: "/packages/active-charts/all-exports/interaction"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:interaction"
---

# Interaction

Exported by `@workspace/active-charts`. Generated from the package source; part of [the index of every export](/packages/active-charts/all-exports).

## Types

**ChartValueRole**

```ts
type ChartValueRole =
  'open' | 'high' | 'low' | 'close' | 'min' | 'q1' | 'median' | 'q3' | 'max';
```

A value role of a compound mark: the four prices of a candle or OHLC bar,
the five statistics of a box plot, the two ends of a range.

**FlatPoint**

```ts
interface FlatPoint {
  x: number;
  y: number;
  seriesIndex: number;
  datumIndex: number;
  datum: ChartDatum;
  seriesName: string;
  color: string;
  yKey: string;
  xKey: string;
  sizeKey?: string;
  xAxisId?: string;
  yAxisId?: string;
}
```

A flattened data point with pixel coordinates for Voronoi hit-detection.

**SharedTooltipData**

```ts
interface SharedTooltipData {
  mode: 'shared';
  xValue: Date | number | string;
  context?: ChartTooltipContext;
  point: FlatPoint;
  entries: Array<{
    seriesName: string;
    color: string;
    yKey: string;
    yValue: number | null;
    valueSemantics?: ChartValueSemantics;
    errorBounds?: TooltipErrorBounds;
    zone?: string;
  }>;
}
```

Tooltip data for shared mode — all series at the same X position.

**SingleTooltipData**

```ts
interface SingleTooltipData {
  mode: 'single';
  point: FlatPoint;
  xValue: Date | number | string;
  context?: ChartTooltipContext;
  yValue: number;
  valueMissing?: boolean;
  sizeValue?: number;
  sizeKey?: string;
  sizeName?: string;
  sizeMissing?: boolean;
  colorMeasure?: {readonly label: string; readonly value: string};
  ohlc?: {open: number; high: number; low: number; close: number};
  roles?: ReadonlyArray<{role: ChartValueRole; value: number}>;
  waterfall?: {value: number; cumulative: number; kind: WaterfallStepKind};
  colorClass?: string;
  errorBounds?: TooltipErrorBounds;
  xErrorBounds?: TooltipErrorBounds;
  zone?: string;
}
```

Tooltip data for single mode.

**TooltipErrorBounds**

```ts
interface TooltipErrorBounds {
  readonly low?: number;
  readonly high?: number;
}
```

The error bounds a tooltip states for a point (T3): a bound that is
missing, not finite, or part of an inverted pair is absent.

**SplitTooltipData**

```ts
interface SplitTooltipData {
  mode: 'split';
  xValue: Date | number | string;
  context?: ChartTooltipContext;
  point: FlatPoint;
  entries: Array<{
    seriesName: string;
    color: string;
    yKey: string;
    yValue: number | null;
    valueSemantics?: ChartValueSemantics;
    errorBounds?: TooltipErrorBounds;
    zone?: string;
    pixelY: number;
  }>;
}
```

Tooltip data for split mode — per-series boxes with pixel positions.

**TooltipData**

```ts
type TooltipData =
  SingleTooltipData | SharedTooltipData | SplitTooltipData;
```
