DocsAPI referenceUI machineschart-shell

chart-shell machine

The public state machine contract for @grassroot/ui-machines/chart-shell. The machine owns behaviour; the matching headless layer owns composition.

@grassroot/ui-machines/chart-shell

Package

79 exports
View source packages/ui-machines/src/chart-shell/index.ts

Service example

chart-shell.tsts
import { createService } from "@grassroot/statechart";
import { chartShellMachine } from "@grassroot/ui-machines/chart-shell";
const service = createService(chartShellMachine, { input: {} });
service.start();
service.send({ type: "…" });
service.stop();

Exports

Unique names in canonical order. Unknown strings are dropped.

DeclarationView source
canonicalChildNamests
declare function canonicalChildNames(names: readonly string[] | undefined): readonly ChartShellChildName[];
Name
Kind
Type
Requirement
names
parameter
readonly string[] | undefined
required
return
return value
readonly ChartShellChildName[]
n/a
Name
names
Kind
parameter
Type
readonly string[] | undefined
Requirement
required
Name
return
Kind
return value
Type
readonly ChartShellChildName[]
Requirement
n/a
DeclarationView source
canonicalHiddenSeriests
declare function canonicalHiddenSeries(ids: readonly string[] | undefined): readonly string[];
Name
Kind
Type
Requirement
ids
parameter
readonly string[] | undefined
required
return
return value
readonly string[]
n/a
Name
ids
Kind
parameter
Type
readonly string[] | undefined
Requirement
required
Name
return
Kind
return value
Type
readonly string[]
Requirement
n/a
DeclarationView source
canonicalOrderedIdsts
declare function canonicalOrderedIds(ids: readonly string[] | undefined): readonly string[];
Name
Kind
Type
Requirement
ids
parameter
readonly string[] | undefined
required
return
return value
readonly string[]
n/a
Name
ids
Kind
parameter
Type
readonly string[] | undefined
Requirement
required
Name
return
Kind
return value
Type
readonly string[]
Requirement
n/a
DeclarationView source
CHART_SHELL_ANNOUNCE_CLEAREDts
export declare const CHART_SHELL_ANNOUNCE_CLEARED: "chart-shell.cleared";
DeclarationView source
CHART_SHELL_ANNOUNCE_TARGETts
export declare const CHART_SHELL_ANNOUNCE_TARGET: "chart-shell.target";
DeclarationView source
CHART_SHELL_CHILD_NAMESts
export declare const CHART_SHELL_CHILD_NAMES: readonly ["tooltip", "legend", "selection", "brush", "zoom", "keyboard"];
DeclarationView source
ChartActiveTargetChangeCommandts
type ChartActiveTargetChangeCommand = {
readonly type: "ACTIVE_TARGET_CHANGE_REQUEST";
readonly id: string | null;
readonly reason: ChartTargetReason;
};
Name
Kind
Type
Requirement
id
property
string | null
required
reason
property
ChartTargetReason
required
type
property
"ACTIVE_TARGET_CHANGE_REQUEST"
required
Name
id
Kind
property
Type
string | null
Requirement
required
Name
reason
Kind
property
Type
ChartTargetReason
Requirement
required
Name
type
Kind
property
Type
"ACTIVE_TARGET_CHANGE_REQUEST"
Requirement
required
DeclarationView source
ChartAnnounceCommandts
type ChartAnnounceCommand = {
readonly type: "ANNOUNCE";
readonly key: string;
readonly args: {
readonly [key: string]: string | number | null;
};
readonly politeness: "polite" | "assertive";
};
Name
Kind
Type
Requirement
args
property
{ readonly [key: string]: string | number | null; }
required
key
property
string
required
politeness
property
"polite" | "assertive"
required
type
property
"ANNOUNCE"
required
Name
args
Kind
property
Type
{ readonly [key: string]: string | number | null; }
Requirement
required
Name
key
Kind
property
Type
string
Requirement
required
Name
politeness
Kind
property
Type
"polite" | "assertive"
Requirement
required
Name
type
Kind
property
Type
"ANNOUNCE"
Requirement
required
DeclarationView source
ChartBrushChildCommandts
type ChartBrushChildCommand = {
readonly type: "BRUSH_DOMAIN_CHANGE_REQUEST";
readonly domain: ChartXDomain;
readonly reason: "brush";
};
Name
Kind
Type
Requirement
domain
property
ChartXDomain
required
reason
property
"brush"
required
type
property
"BRUSH_DOMAIN_CHANGE_REQUEST"
required
Name
domain
Kind
property
Type
ChartXDomain
Requirement
required
Name
reason
Kind
property
Type
"brush"
Requirement
required
Name
type
Kind
property
Type
"BRUSH_DOMAIN_CHANGE_REQUEST"
Requirement
required
DeclarationView source
ChartBrushChildEventts
type ChartBrushChildEvent = {
readonly type: "BRUSH_START";
readonly domain: ChartXDomain;
} | {
readonly type: "BRUSH_MOVE";
readonly domain: ChartXDomain;
} | {
readonly type: "BRUSH_END";
readonly domain: ChartXDomain;
} | {
readonly type: "BRUSH_CANCEL";
} | {
readonly type: "BRUSH_DOMAIN_SYNC";
readonly domain: ChartXDomain;
};
DeclarationView source
ChartBrushChildInputts
type ChartBrushChildInput = {
readonly brushDomain?: ChartXDomain;
readonly defaultBrushDomain?: ChartXDomain;
readonly bounds?: ChartXDomain;
};
Name
Kind
Type
Requirement
bounds
property
ChartXDomain
optional
brushDomain
property
ChartXDomain
optional
defaultBrushDomain
property
ChartXDomain
optional
Name
bounds
Kind
property
Type
ChartXDomain
Requirement
optional
Name
brushDomain
Kind
property
Type
ChartXDomain
Requirement
optional
Name
defaultBrushDomain
Kind
property
Type
ChartXDomain
Requirement
optional
DeclarationView source
ChartBrushChildStatets
type ChartBrushChildState = {
readonly value: "idle" | "brushing";
readonly context: {
readonly mode: BindingMode;
readonly domain: ChartXDomain;
readonly draft: ChartXDomain;
};
};
Name
Kind
Type
Requirement
context
property
{ readonly mode: BindingMode; readonly domain: ChartXDomain; readonly draft: ChartXDomain; }
required
value
property
"idle" | "brushing"
required
Name
context
Kind
property
Type
{ readonly mode: BindingMode; readonly domain: ChartXDomain; readonly draft: ChartXDomain; }
Requirement
required
Name
value
Kind
property
Type
"idle" | "brushing"
Requirement
required
DeclarationView source
ChartDomainChangeReasonts
type ChartDomainChangeReason = "brush" | "wheel" | "pan" | "pinch" | "keyboard" | "programmatic";

JSON-safe chart domain values owned by `@grassroot/ui-machines/chart-shell`. Headless and chart-spec consume these; this module imports no chart-spec type. `[T6-F4-live]` — brush/zoom are not general chart APIs this slice.

DeclarationView source
ChartDomainScalarts
type ChartDomainScalar = string | number;
DeclarationView source
ChartKeyboardChildCommandts
type ChartKeyboardChildCommand = ChartActiveTargetChangeCommand | ChartAnnounceCommand;
DeclarationView source
ChartKeyboardChildEventts
type ChartKeyboardChildEvent = {
readonly type: "NAVIGATE_NEXT";
} | {
readonly type: "NAVIGATE_PREVIOUS";
} | {
readonly type: "NAVIGATE_FIRST";
} | {
readonly type: "NAVIGATE_LAST";
} | {
readonly type: "NAVIGATE_CLEAR";
} | {
readonly type: "TARGET_ORDER_SYNC";
readonly ids: readonly string[];
};
DeclarationView source
ChartKeyboardChildInputts
type ChartKeyboardChildInput = {
readonly orderedIds?: readonly string[];
};
Name
Kind
Type
Requirement
orderedIds
property
readonly string[]
optional
Name
orderedIds
Kind
property
Type
readonly string[]
Requirement
optional
DeclarationView source
ChartKeyboardChildStatets
type ChartKeyboardChildState = {
readonly value: "ready";
readonly context: {
readonly orderedIds: readonly string[];
readonly activeIndex: number | null;
};
};
Name
Kind
Type
Requirement
context
property
{ readonly orderedIds: readonly string[]; readonly activeIndex: number | null; }
required
value
property
"ready"
required
Name
context
Kind
property
Type
{ readonly orderedIds: readonly string[]; readonly activeIndex: number | null; }
Requirement
required
Name
value
Kind
property
Type
"ready"
Requirement
required
DeclarationView source
ChartLegendChangeReasonts
type ChartLegendChangeReason = "pointer" | "keyboard" | "programmatic";
DeclarationView source
ChartLegendChildCommandts
type ChartLegendChildCommand = {
readonly type: "HIDDEN_SERIES_CHANGE_REQUEST";
readonly ids: readonly string[];
readonly reason: ChartLegendChangeReason;
};
Name
Kind
Type
Requirement
ids
property
readonly string[]
required
reason
property
ChartLegendChangeReason
required
type
property
"HIDDEN_SERIES_CHANGE_REQUEST"
required
Name
ids
Kind
property
Type
readonly string[]
Requirement
required
Name
reason
Kind
property
Type
ChartLegendChangeReason
Requirement
required
Name
type
Kind
property
Type
"HIDDEN_SERIES_CHANGE_REQUEST"
Requirement
required
DeclarationView source
ChartLegendChildEventts
type ChartLegendChildEvent = {
readonly type: "LEGEND_TOGGLE";
readonly id: string;
readonly reason?: ChartLegendChangeReason;
} | {
readonly type: "LEGEND_SET";
readonly ids: readonly string[];
readonly reason?: ChartLegendChangeReason;
} | {
readonly type: "LEGEND_RESET";
} | {
readonly type: "HIDDEN_SERIES_SYNC";
readonly ids: readonly string[];
};
DeclarationView source
ChartLegendChildInputts
type ChartLegendChildInput = {
readonly hiddenSeries?: readonly string[];
readonly defaultHiddenSeries?: readonly string[];
readonly seriesIds?: readonly string[];
};
Name
Kind
Type
Requirement
defaultHiddenSeries
property
readonly string[]
optional
hiddenSeries
property
readonly string[]
optional
seriesIds
property
readonly string[]
optional
Name
defaultHiddenSeries
Kind
property
Type
readonly string[]
Requirement
optional
Name
hiddenSeries
Kind
property
Type
readonly string[]
Requirement
optional
Name
seriesIds
Kind
property
Type
readonly string[]
Requirement
optional
DeclarationView source
ChartLegendChildStatets
type ChartLegendChildState = {
readonly value: "ready";
readonly context: {
readonly mode: BindingMode;
readonly hiddenSeries: readonly string[];
};
};
Name
Kind
Type
Requirement
context
property
{ readonly mode: BindingMode; readonly hiddenSeries: readonly string[]; }
required
value
property
"ready"
required
Name
context
Kind
property
Type
{ readonly mode: BindingMode; readonly hiddenSeries: readonly string[]; }
Requirement
required
Name
value
Kind
property
Type
"ready"
Requirement
required
DeclarationView source
ChartShellChildNamets
type ChartShellChildName = (typeof CHART_SHELL_CHILD_NAMES)[number];
DeclarationView source
ChartShellCommandts
type ChartShellCommand = ChartTooltipChildCommand | ChartLegendChildCommand | SelectionCommand | ChartBrushChildCommand | ChartZoomChildCommand | ChartKeyboardChildCommand;
DeclarationView source
ChartShellContextts
type ChartShellContext = {
readonly tooltip: ChartTooltipChildState | null;
readonly legend: ChartLegendChildState | null;
readonly selection: SelectionMachineState | null;
readonly brush: ChartBrushChildState | null;
readonly zoom: ChartZoomChildState | null;
readonly keyboard: ChartKeyboardChildState | null;
};
Name
Kind
Type
Requirement
brush
property
ChartBrushChildState | null
required
keyboard
property
ChartKeyboardChildState | null
required
legend
property
ChartLegendChildState | null
required
selection
property
SelectionMachineState | null
required
tooltip
property
ChartTooltipChildState | null
required
zoom
property
ChartZoomChildState | null
required
Name
brush
Kind
property
Type
ChartBrushChildState | null
Requirement
required
Name
keyboard
Kind
property
Type
ChartKeyboardChildState | null
Requirement
required
Name
legend
Kind
property
Type
ChartLegendChildState | null
Requirement
required
Name
selection
Kind
property
Type
SelectionMachineState | null
Requirement
required
Name
tooltip
Kind
property
Type
ChartTooltipChildState | null
Requirement
required
Name
zoom
Kind
property
Type
ChartZoomChildState | null
Requirement
required
DeclarationView source
ChartShellDiagnosticCodests
export declare const ChartShellDiagnosticCodes: readonly DiagnosticCatalogueEntry[];
DeclarationView source
ChartShellEventts
type ChartShellEvent = ChartTooltipChildEvent | ChartLegendChildEvent | SelectionEvent | ChartBrushChildEvent | ChartZoomChildEvent | ChartKeyboardChildEvent;
DeclarationView source
ChartShellInputts
type ChartShellInput = {
readonly children?: readonly string[];
readonly tooltip?: ChartTooltipChildInput;
readonly selection?: SelectionInput;
readonly legend?: ChartLegendChildInput;
readonly brush?: ChartBrushChildInput;
readonly zoom?: ChartZoomChildInput;
/** Route a valid brush commit through the existing zoom child. @default false */
readonly zoomOnBrush?: boolean;
readonly keyboard?: ChartKeyboardChildInput;
};
Name
Kind
Type
Requirement
Description
brush
property
ChartBrushChildInput
optional
children
property
readonly string[]
optional
keyboard
property
ChartKeyboardChildInput
optional
legend
property
ChartLegendChildInput
optional
selection
property
SelectionInput
optional
tooltip
property
ChartTooltipChildInput
optional
zoom
property
ChartZoomChildInput
optional
zoomOnBrush
property
boolean
optional
Route a valid brush commit through the existing zoom child.
Name
brush
Kind
property
Type
ChartBrushChildInput
Requirement
optional
Description
Name
children
Kind
property
Type
readonly string[]
Requirement
optional
Description
Name
keyboard
Kind
property
Type
ChartKeyboardChildInput
Requirement
optional
Description
Name
legend
Kind
property
Type
ChartLegendChildInput
Requirement
optional
Description
Name
selection
Kind
property
Type
SelectionInput
Requirement
optional
Description
Name
tooltip
Kind
property
Type
ChartTooltipChildInput
Requirement
optional
Description
Name
zoom
Kind
property
Type
ChartZoomChildInput
Requirement
optional
Description
Name
zoomOnBrush
Kind
property
Type
boolean
Requirement
optional
Description
Route a valid brush commit through the existing zoom child.
DeclarationView source
chartShellMachinets
export declare const chartShellMachine: ChartShellMachine;
DeclarationView source
ChartShellMachinets
type ChartShellMachine = Machine<ChartShellInput, ChartShellStateValue, ChartShellContext, ChartShellEvent, ChartShellCommand>;
DeclarationView source
ChartShellMachineStatets
type ChartShellMachineState = MachineState<ChartShellStateValue, ChartShellContext>;
DeclarationView source
chartShellReplaySequencets
export declare const chartShellReplaySequence: readonly ChartShellEvent[];
DeclarationView source
chartShellSelectorsts
export declare const chartShellSelectors: {
tooltip: (snapshot: ChartShellSnapshot) => ChartTooltipChildState | null;
legend: (snapshot: ChartShellSnapshot) => ChartLegendChildState | null;
selection: (snapshot: ChartShellSnapshot) => SelectionMachineState | null;
brush: (snapshot: ChartShellSnapshot) => ChartBrushChildState | null;
zoom: (snapshot: ChartShellSnapshot) => ChartZoomChildState | null;
keyboard: (snapshot: ChartShellSnapshot) => ChartKeyboardChildState | null;
tooltipOpen: (snapshot: ChartShellSnapshot) => boolean;
candidateId: (snapshot: ChartShellSnapshot) => string | null;
activeId: (snapshot: ChartShellSnapshot) => string | null;
selectedIds: (snapshot: ChartShellSnapshot) => SelectionValue;
hiddenSeries: (snapshot: ChartShellSnapshot) => readonly string[];
brushDomain: (snapshot: ChartShellSnapshot) => {
readonly start: ChartDomainScalar;
readonly end: ChartDomainScalar;
} | null;
brushDraft: (snapshot: ChartShellSnapshot) => {
readonly start: ChartDomainScalar;
readonly end: ChartDomainScalar;
} | null;
zoomDomain: (snapshot: ChartShellSnapshot) => {
readonly start: ChartDomainScalar;
readonly end: ChartDomainScalar;
} | null;
keyboardActiveIndex: (snapshot: ChartShellSnapshot) => number | null;
keyboardActiveId: (snapshot: ChartShellSnapshot) => string | null;
enabledChildren: (snapshot: ChartShellSnapshot) => readonly ChartShellChildName[];
};
Name
Kind
Type
Requirement
activeId
property
(snapshot: ChartShellSnapshot) => string | null
required
brush
property
(snapshot: ChartShellSnapshot) => ChartBrushChildState | null
required
brushDomain
property
(snapshot: ChartShellSnapshot) => { readonly start: ChartDomainScalar; readonly end: ChartDomainScalar; } | null
required
brushDraft
property
(snapshot: ChartShellSnapshot) => { readonly start: ChartDomainScalar; readonly end: ChartDomainScalar; } | null
required
candidateId
property
(snapshot: ChartShellSnapshot) => string | null
required
enabledChildren
property
(snapshot: ChartShellSnapshot) => readonly ChartShellChildName[]
required
hiddenSeries
property
(snapshot: ChartShellSnapshot) => readonly string[]
required
keyboard
property
(snapshot: ChartShellSnapshot) => ChartKeyboardChildState | null
required
keyboardActiveId
property
(snapshot: ChartShellSnapshot) => string | null
required
keyboardActiveIndex
property
(snapshot: ChartShellSnapshot) => number | null
required
legend
property
(snapshot: ChartShellSnapshot) => ChartLegendChildState | null
required
selectedIds
property
(snapshot: ChartShellSnapshot) => SelectionValue
required
selection
property
(snapshot: ChartShellSnapshot) => SelectionMachineState | null
required
tooltip
property
(snapshot: ChartShellSnapshot) => ChartTooltipChildState | null
required
Name
activeId
Kind
property
Type
(snapshot: ChartShellSnapshot) => string | null
Requirement
required
Name
brush
Kind
property
Type
(snapshot: ChartShellSnapshot) => ChartBrushChildState | null
Requirement
required
Name
brushDomain
Kind
property
Type
(snapshot: ChartShellSnapshot) => { readonly start: ChartDomainScalar; readonly end: ChartDomainScalar; } | null
Requirement
required
Name
brushDraft
Kind
property
Type
(snapshot: ChartShellSnapshot) => { readonly start: ChartDomainScalar; readonly end: ChartDomainScalar; } | null
Requirement
required
Name
candidateId
Kind
property
Type
(snapshot: ChartShellSnapshot) => string | null
Requirement
required
Name
enabledChildren
Kind
property
Type
(snapshot: ChartShellSnapshot) => readonly ChartShellChildName[]
Requirement
required
Name
hiddenSeries
Kind
property
Type
(snapshot: ChartShellSnapshot) => readonly string[]
Requirement
required
Name
keyboard
Kind
property
Type
(snapshot: ChartShellSnapshot) => ChartKeyboardChildState | null
Requirement
required
Name
keyboardActiveId
Kind
property
Type
(snapshot: ChartShellSnapshot) => string | null
Requirement
required
Name
keyboardActiveIndex
Kind
property
Type
(snapshot: ChartShellSnapshot) => number | null
Requirement
required
Name
legend
Kind
property
Type
(snapshot: ChartShellSnapshot) => ChartLegendChildState | null
Requirement
required
Name
selectedIds
Kind
property
Type
(snapshot: ChartShellSnapshot) => SelectionValue
Requirement
required
Name
selection
Kind
property
Type
(snapshot: ChartShellSnapshot) => SelectionMachineState | null
Requirement
required
Name
tooltip
Kind
property
Type
(snapshot: ChartShellSnapshot) => ChartTooltipChildState | null
Requirement
required
Name
tooltipOpen
Kind
property
Type
(snapshot: ChartShellSnapshot) => boolean
Requirement
required
Name
zoom
Kind
property
Type
(snapshot: ChartShellSnapshot) => ChartZoomChildState | null
Requirement
required
Name
zoomDomain
Kind
property
Type
(snapshot: ChartShellSnapshot) => { readonly start: ChartDomainScalar; readonly end: ChartDomainScalar; } | null
Requirement
required
DeclarationView source
ChartShellSnapshotts
type ChartShellSnapshot = Snapshot<ChartShellStateValue, ChartShellContext>;
DeclarationView source
ChartShellStateValuets
type ChartShellStateValue = "ready";
DeclarationView source
ChartTargetReasonts
type ChartTargetReason = "pointer" | "focus" | "keyboard" | "programmatic";
DeclarationView source
ChartTooltipChildCommandts
type ChartTooltipChildCommand = TooltipCommand | ChartActiveTargetChangeCommand;
DeclarationView source
ChartTooltipChildEventts
type ChartTooltipChildEvent = {
readonly type: "TARGET_ENTER";
readonly id: string;
readonly reason: ChartTargetReason;
} | {
readonly type: "TARGET_LEAVE";
readonly id: string;
readonly reason: ChartTargetReason;
} | {
readonly type: "TARGET_FOCUS";
readonly id: string;
readonly reason: ChartTargetReason;
} | {
readonly type: "TARGET_BLUR";
readonly id: string;
readonly reason: ChartTargetReason;
} | {
readonly type: "ACTIVE_TARGET_SYNC";
readonly id: string | null;
} | TooltipEvent;
DeclarationView source
ChartTooltipChildInputts
type ChartTooltipChildInput = TooltipInput & {
readonly activeId?: string | null;
readonly defaultActiveId?: string | null;
};
Name
Kind
Type
Requirement
activeId
property
string | null
optional
defaultActiveId
property
string | null
optional
Name
activeId
Kind
property
Type
string | null
Requirement
optional
Name
defaultActiveId
Kind
property
Type
string | null
Requirement
optional
DeclarationView source
ChartTooltipChildStatets
type ChartTooltipChildState = {
readonly lifecycle: MachineState<TooltipStateValue, TooltipContext>;
readonly candidateId: string | null;
readonly activeId: string | null;
readonly targetMode: BindingMode;
};
Name
Kind
Type
Requirement
activeId
property
string | null
required
candidateId
property
string | null
required
lifecycle
property
MachineState<TooltipStateValue, TooltipContext>
required
targetMode
property
BindingMode
required
Name
activeId
Kind
property
Type
string | null
Requirement
required
Name
candidateId
Kind
property
Type
string | null
Requirement
required
Name
lifecycle
Kind
property
Type
MachineState<TooltipStateValue, TooltipContext>
Requirement
required
Name
targetMode
Kind
property
Type
BindingMode
Requirement
required
DeclarationView source
ChartXDomaints
type ChartXDomain = {
readonly start: ChartDomainScalar;
readonly end: ChartDomainScalar;
} | null;
DeclarationView source
ChartXDomainChangeDetailts
type ChartXDomainChangeDetail = {
readonly domain: ChartXDomain;
readonly reason: ChartDomainChangeReason;
};
Name
Kind
Type
Requirement
domain
property
ChartXDomain
required
reason
property
ChartDomainChangeReason
required
Name
domain
Kind
property
Type
ChartXDomain
Requirement
required
Name
reason
Kind
property
Type
ChartDomainChangeReason
Requirement
required
DeclarationView source
ChartZoomChildCommandts
type ChartZoomChildCommand = {
readonly type: "ZOOM_DOMAIN_CHANGE_REQUEST";
readonly domain: ChartXDomain;
readonly reason: ChartDomainChangeReason;
};
Name
Kind
Type
Requirement
domain
property
ChartXDomain
required
reason
property
ChartDomainChangeReason
required
type
property
"ZOOM_DOMAIN_CHANGE_REQUEST"
required
Name
domain
Kind
property
Type
ChartXDomain
Requirement
required
Name
reason
Kind
property
Type
ChartDomainChangeReason
Requirement
required
Name
type
Kind
property
Type
"ZOOM_DOMAIN_CHANGE_REQUEST"
Requirement
required
DeclarationView source
ChartZoomChildEventts
type ChartZoomChildEvent = {
readonly type: "ZOOM_REQUEST";
readonly domain: ChartXDomain;
readonly reason: ChartDomainChangeReason;
} | {
readonly type: "ZOOM_RESET";
} | {
readonly type: "ZOOM_DOMAIN_SYNC";
readonly domain: ChartXDomain;
};
DeclarationView source
ChartZoomChildInputts
type ChartZoomChildInput = {
readonly domain?: ChartXDomain;
readonly defaultDomain?: ChartXDomain;
readonly bounds?: ChartXDomain;
};
Name
Kind
Type
Requirement
bounds
property
ChartXDomain
optional
defaultDomain
property
ChartXDomain
optional
domain
property
ChartXDomain
optional
Name
bounds
Kind
property
Type
ChartXDomain
Requirement
optional
Name
defaultDomain
Kind
property
Type
ChartXDomain
Requirement
optional
Name
domain
Kind
property
Type
ChartXDomain
Requirement
optional
DeclarationView source
ChartZoomChildStatets
type ChartZoomChildState = {
readonly value: "ready";
readonly context: {
readonly mode: BindingMode;
readonly domain: ChartXDomain;
};
};
Name
Kind
Type
Requirement
context
property
{ readonly mode: BindingMode; readonly domain: ChartXDomain; }
required
value
property
"ready"
required
Name
context
Kind
property
Type
{ readonly mode: BindingMode; readonly domain: ChartXDomain; }
Requirement
required
Name
value
Kind
property
Type
"ready"
Requirement
required

childEnabled

function
DeclarationView source
childEnabledts
declare function childEnabled(enabled: readonly ChartShellChildName[], name: ChartShellChildName): boolean;
Name
Kind
Type
Requirement
enabled
parameter
readonly ChartShellChildName[]
required
name
parameter
ChartShellChildName
required
return
return value
boolean
n/a
Name
enabled
Kind
parameter
Type
readonly ChartShellChildName[]
Requirement
required
Name
name
Kind
parameter
Type
ChartShellChildName
Requirement
required
Name
return
Kind
return value
Type
boolean
Requirement
n/a
DeclarationView source
clampChartXDomaints
declare function clampChartXDomain(domain: ChartXDomain, bounds: ChartXDomain): ChartXDomain;
Name
Kind
Type
Requirement
domain
parameter
ChartXDomain
required
bounds
parameter
ChartXDomain
required
return
return value
ChartXDomain
n/a
Name
domain
Kind
parameter
Type
ChartXDomain
Requirement
required
Name
bounds
Kind
parameter
Type
ChartXDomain
Requirement
required
Name
return
Kind
return value
Type
ChartXDomain
Requirement
n/a

Pan keeps the requested span and shifts it inside bounds. Non-numeric domains clamp per endpoint.

DeclarationView source
clampPanChartXDomaints
declare function clampPanChartXDomain(domain: ChartXDomain, bounds: ChartXDomain): ChartXDomain;
Name
Kind
Type
Requirement
domain
parameter
ChartXDomain
required
bounds
parameter
ChartXDomain
required
return
return value
ChartXDomain
n/a
Name
domain
Kind
parameter
Type
ChartXDomain
Requirement
required
Name
bounds
Kind
parameter
Type
ChartXDomain
Requirement
required
Name
return
Kind
return value
Type
ChartXDomain
Requirement
n/a
DeclarationView source
EMPTY_CHILD_NAMESts
export declare const EMPTY_CHILD_NAMES: readonly ChartShellChildName[];
DeclarationView source
EMPTY_HIDDEN_SERIESts
export declare const EMPTY_HIDDEN_SERIES: readonly string[];
DeclarationView source
EMPTY_ORDERED_IDSts
export declare const EMPTY_ORDERED_IDS: readonly string[];
DeclarationView source
EMPTY_SELECTION_IDSts
export declare const EMPTY_SELECTION_IDS: SelectionValue;
DeclarationView source
isBrushChildEventts
declare function isBrushChildEvent(event: {
readonly type: string;
}): event is ChartBrushChildEvent;
Name
Kind
Type
Requirement
event
parameter
{ readonly type: string; }
required
return
return value
event is ChartBrushChildEvent
n/a
Name
event
Kind
parameter
Type
{ readonly type: string; }
Requirement
required
Name
return
Kind
return value
Type
event is ChartBrushChildEvent
Requirement
n/a
DeclarationView source
isChartShellChildNamets
declare function isChartShellChildName(value: string): value is ChartShellChildName;
Name
Kind
Type
Requirement
value
parameter
string
required
return
return value
value is ChartShellChildName
n/a
Name
value
Kind
parameter
Type
string
Requirement
required
Name
return
Kind
return value
Type
value is ChartShellChildName
Requirement
n/a
DeclarationView source
isKeyboardChildEventts
declare function isKeyboardChildEvent(event: {
readonly type: string;
}): event is ChartKeyboardChildEvent;
Name
Kind
Type
Requirement
event
parameter
{ readonly type: string; }
required
return
return value
event is ChartKeyboardChildEvent
n/a
Name
event
Kind
parameter
Type
{ readonly type: string; }
Requirement
required
Name
return
Kind
return value
Type
event is ChartKeyboardChildEvent
Requirement
n/a
DeclarationView source
isLegendChildEventts
declare function isLegendChildEvent(event: {
readonly type: string;
}): event is ChartLegendChildEvent;
Name
Kind
Type
Requirement
event
parameter
{ readonly type: string; }
required
return
return value
event is ChartLegendChildEvent
n/a
Name
event
Kind
parameter
Type
{ readonly type: string; }
Requirement
required
Name
return
Kind
return value
Type
event is ChartLegendChildEvent
Requirement
n/a
DeclarationView source
isTooltipChildEventts
declare function isTooltipChildEvent(event: {
readonly type: string;
}): event is ChartTooltipChildEvent;
Name
Kind
Type
Requirement
event
parameter
{ readonly type: string; }
required
return
return value
event is ChartTooltipChildEvent
n/a
Name
event
Kind
parameter
Type
{ readonly type: string; }
Requirement
required
Name
return
Kind
return value
Type
event is ChartTooltipChildEvent
Requirement
n/a
DeclarationView source
isValidChartXDomaints
declare function isValidChartXDomain(domain: ChartXDomain): boolean;
Name
Kind
Type
Requirement
domain
parameter
ChartXDomain
required
return
return value
boolean
n/a
Name
domain
Kind
parameter
Type
ChartXDomain
Requirement
required
Name
return
Kind
return value
Type
boolean
Requirement
n/a
DeclarationView source
isZeroWidthChartXDomaints
declare function isZeroWidthChartXDomain(domain: ChartXDomain): boolean;
Name
Kind
Type
Requirement
domain
parameter
ChartXDomain
required
return
return value
boolean
n/a
Name
domain
Kind
parameter
Type
ChartXDomain
Requirement
required
Name
return
Kind
return value
Type
boolean
Requirement
n/a

isZoomChildEvent

function
DeclarationView source
isZoomChildEventts
declare function isZoomChildEvent(event: {
readonly type: string;
}): event is ChartZoomChildEvent;
Name
Kind
Type
Requirement
event
parameter
{ readonly type: string; }
required
return
return value
event is ChartZoomChildEvent
n/a
Name
event
Kind
parameter
Type
{ readonly type: string; }
Requirement
required
Name
return
Kind
return value
Type
event is ChartZoomChildEvent
Requirement
n/a

Order endpoints so start <= end when they share a type. Mixed types pass through.

DeclarationView source
normalizeChartXDomaints
declare function normalizeChartXDomain(domain: ChartXDomain): ChartXDomain;
Name
Kind
Type
Requirement
domain
parameter
ChartXDomain
required
return
return value
ChartXDomain
n/a
Name
domain
Kind
parameter
Type
ChartXDomain
Requirement
required
Name
return
Kind
return value
Type
ChartXDomain
Requirement
n/a

sameChartXDomain

function
DeclarationView source
sameChartXDomaints
declare function sameChartXDomain(left: ChartXDomain, right: ChartXDomain): boolean;
Name
Kind
Type
Requirement
left
parameter
ChartXDomain
required
right
parameter
ChartXDomain
required
return
return value
boolean
n/a
Name
left
Kind
parameter
Type
ChartXDomain
Requirement
required
Name
right
Kind
parameter
Type
ChartXDomain
Requirement
required
Name
return
Kind
return value
Type
boolean
Requirement
n/a

sameChildNames

function
DeclarationView source
sameChildNamests
declare function sameChildNames(left: readonly ChartShellChildName[], right: readonly ChartShellChildName[]): boolean;
Name
Kind
Type
Requirement
left
parameter
readonly ChartShellChildName[]
required
right
parameter
readonly ChartShellChildName[]
required
return
return value
boolean
n/a
Name
left
Kind
parameter
Type
readonly ChartShellChildName[]
Requirement
required
Name
right
Kind
parameter
Type
readonly ChartShellChildName[]
Requirement
required
Name
return
Kind
return value
Type
boolean
Requirement
n/a

sameHiddenSeries

function
DeclarationView source
sameHiddenSeriests
declare function sameHiddenSeries(left: readonly string[], right: readonly string[]): boolean;
Name
Kind
Type
Requirement
left
parameter
readonly string[]
required
right
parameter
readonly string[]
required
return
return value
boolean
n/a
Name
left
Kind
parameter
Type
readonly string[]
Requirement
required
Name
right
Kind
parameter
Type
readonly string[]
Requirement
required
Name
return
Kind
return value
Type
boolean
Requirement
n/a

sameOrderedIds

function
DeclarationView source
sameOrderedIdsts
declare function sameOrderedIds(left: readonly string[], right: readonly string[]): boolean;
Name
Kind
Type
Requirement
left
parameter
readonly string[]
required
right
parameter
readonly string[]
required
return
return value
boolean
n/a
Name
left
Kind
parameter
Type
readonly string[]
Requirement
required
Name
right
Kind
parameter
Type
readonly string[]
Requirement
required
Name
return
Kind
return value
Type
boolean
Requirement
n/a

sameSelectionIds

function
DeclarationView source
sameSelectionIdsts
declare function sameSelectionIds(left: SelectionValue, right: SelectionValue): boolean;
Name
Kind
Type
Requirement
left
parameter
SelectionValue
required
right
parameter
SelectionValue
required
return
return value
boolean
n/a
Name
left
Kind
parameter
Type
SelectionValue
Requirement
required
Name
right
Kind
parameter
Type
SelectionValue
Requirement
required
Name
return
Kind
return value
Type
boolean
Requirement
n/a
DeclarationView source
SelectionChangeDetailts
type SelectionChangeDetail = {
readonly selectedIds: SelectionValue;
readonly reason: SelectionChangeReason;
};
Name
Kind
Type
Requirement
reason
property
SelectionChangeReason
required
selectedIds
property
SelectionValue
required
Name
reason
Kind
property
Type
SelectionChangeReason
Requirement
required
Name
selectedIds
Kind
property
Type
SelectionValue
Requirement
required
DeclarationView source
SelectionChangeReasonts
type SelectionChangeReason = "pointer" | "keyboard" | "programmatic";
DeclarationView source
SelectionCommandts
type SelectionCommand = CommandObject & {
readonly type: "SELECTION_CHANGE_REQUEST";
readonly selectedIds: SelectionValue;
readonly reason: SelectionChangeReason;
};
Name
Kind
Type
Requirement
reason
property
SelectionChangeReason
required
selectedIds
property
SelectionValue
required
type
property
string
required
Name
reason
Kind
property
Type
SelectionChangeReason
Requirement
required
Name
selectedIds
Kind
property
Type
SelectionValue
Requirement
required
Name
type
Kind
property
Type
string
Requirement
required
DeclarationView source
SelectionEventts
type SelectionEvent = {
readonly type: "SELECT";
readonly id: string;
readonly reason: SelectionChangeReason;
} | {
readonly type: "TOGGLE";
readonly id: string;
readonly reason: SelectionChangeReason;
} | {
readonly type: "RANGE_EXTEND";
readonly id: string;
readonly reason: SelectionChangeReason;
} | {
readonly type: "SELECT_ALL";
readonly selectableIds: readonly string[];
readonly reason: SelectionChangeReason;
} | {
readonly type: "CLEAR";
readonly reason: SelectionChangeReason;
} | {
readonly type: "REPLACE";
readonly selectedIds: SelectionValue;
readonly reason: SelectionChangeReason;
} | {
readonly type: "RESET";
};

SelectionInput

interface
DeclarationView source
SelectionInputts
interface SelectionInput {
readonly mode: SelectionMode;
readonly selectedIds?: SelectionValue;
readonly defaultSelectedIds?: SelectionValue;
readonly orderedIds: readonly string[];
readonly disabledIds?: readonly string[];
}
Name
Kind
Type
Requirement
defaultSelectedIds
property
SelectionValue
optional
disabledIds
property
readonly string[]
optional
mode
property
SelectionMode
required
orderedIds
property
readonly string[]
required
selectedIds
property
SelectionValue
optional
Name
defaultSelectedIds
Kind
property
Type
SelectionValue
Requirement
optional
Name
disabledIds
Kind
property
Type
readonly string[]
Requirement
optional
Name
mode
Kind
property
Type
SelectionMode
Requirement
required
Name
orderedIds
Kind
property
Type
readonly string[]
Requirement
required
Name
selectedIds
Kind
property
Type
SelectionValue
Requirement
optional
DeclarationView source
selectionMachinets
export declare const selectionMachine: SelectionMachine;
DeclarationView source
SelectionModets
type SelectionMode = "none" | "single" | "multiple";
DeclarationView source
selectionSelectorsts
export declare const selectionSelectors: {
selectedIds: (snapshot: SelectionSnapshot) => SelectionValue;
anchorId: (snapshot: SelectionSnapshot) => string | null;
bindingMode: (snapshot: SelectionSnapshot) => BindingMode;
isSelected: (snapshot: SelectionSnapshot, id: string) => boolean;
};
Name
Kind
Type
Requirement
anchorId
property
(snapshot: SelectionSnapshot) => string | null
required
bindingMode
property
(snapshot: SelectionSnapshot) => BindingMode
required
isSelected
property
(snapshot: SelectionSnapshot, id: string) => boolean
required
selectedIds
property
(snapshot: SelectionSnapshot) => SelectionValue
required
Name
anchorId
Kind
property
Type
(snapshot: SelectionSnapshot) => string | null
Requirement
required
Name
bindingMode
Kind
property
Type
(snapshot: SelectionSnapshot) => BindingMode
Requirement
required
Name
isSelected
Kind
property
Type
(snapshot: SelectionSnapshot, id: string) => boolean
Requirement
required
Name
selectedIds
Kind
property
Type
(snapshot: SelectionSnapshot) => SelectionValue
Requirement
required
DeclarationView source
SelectionValuets
type SelectionValue = readonly string[];

Clamp step matching live `prepareChartModel().navigate`: null + forward → first; null + backward → last; unknown id + either → first.

DeclarationView source
stepKeyboardIndexts
declare function stepKeyboardIndex(orderedIds: readonly string[], currentIndex: number | null, direction: 1 | -1): number | null;
Name
Kind
Type
Requirement
orderedIds
parameter
readonly string[]
required
currentIndex
parameter
number | null
required
direction
parameter
1 | -1
required
return
return value
number | null
n/a
Name
orderedIds
Kind
parameter
Type
readonly string[]
Requirement
required
Name
currentIndex
Kind
parameter
Type
number | null
Requirement
required
Name
direction
Kind
parameter
Type
1 | -1
Requirement
required
Name
return
Kind
return value
Type
number | null
Requirement
n/a
DeclarationView source
tooltipInputFromShellts
declare function tooltipInputFromShell(input: ChartTooltipChildInput | undefined): TooltipInput;
Name
Kind
Type
Requirement
input
parameter
ChartTooltipChildInput | undefined
required
return
return value
TooltipInput
n/a
Name
input
Kind
parameter
Type
ChartTooltipChildInput | undefined
Requirement
required
Name
return
Kind
return value
Type
TooltipInput
Requirement
n/a