Interaction
ChartValueRole, FlatPoint, SharedTooltipData, SingleTooltipData and 3 more: generated from the source of active-charts.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Types#
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.
type ChartValueRole =
'open' | 'high' | 'low' | 'close' | 'min' | 'q1' | 'median' | 'q3' | 'max';A flattened data point with pixel coordinates for Voronoi hit-detection.
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;
}Tooltip data for single mode.
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;
}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.
interface TooltipErrorBounds {
readonly low?: number;
readonly high?: number;
}Tooltip data for split mode — per-series boxes with pixel positions.
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;
}>;
}type TooltipData =
SingleTooltipData | SharedTooltipData | SplitTooltipData;