- Name
names- Kind
- parameter
- Type
readonly string[] | undefined- Requirement
- required
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
Service example
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
canonicalChildNames
functionUnique names in canonical order. Unknown strings are dropped.
declare function canonicalChildNames(names: readonly string[] | undefined): readonly ChartShellChildName[];namesreadonly string[] | undefinedreturnreadonly ChartShellChildName[]- Name
return- Kind
- return value
- Type
readonly ChartShellChildName[]- Requirement
- n/a
canonicalOrderedIds
functiondeclare function canonicalOrderedIds(ids: readonly string[] | undefined): readonly string[];idsreadonly string[] | undefinedreturnreadonly string[]- Name
ids- Kind
- parameter
- Type
readonly string[] | undefined- Requirement
- required
- Name
return- Kind
- return value
- Type
readonly string[]- Requirement
- n/a
export declare const CHART_SHELL_ANNOUNCE_CLEARED: "chart-shell.cleared";export declare const CHART_SHELL_ANNOUNCE_TARGET: "chart-shell.target";CHART_SHELL_CHILD_NAMES
valueexport declare const CHART_SHELL_CHILD_NAMES: readonly ["tooltip", "legend", "selection", "brush", "zoom", "keyboard"];type ChartActiveTargetChangeCommand = { readonly type: "ACTIVE_TARGET_CHANGE_REQUEST"; readonly id: string | null; readonly reason: ChartTargetReason;};idstring | nullreasonChartTargetReasontype"ACTIVE_TARGET_CHANGE_REQUEST"- 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
ChartAnnounceCommand
typetype ChartAnnounceCommand = { readonly type: "ANNOUNCE"; readonly key: string; readonly args: { readonly [key: string]: string | number | null; }; readonly politeness: "polite" | "assertive";};args{
readonly [key: string]: string | number | null;
}keystringpoliteness"polite" | "assertive"type"ANNOUNCE"- 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
type ChartBrushChildCommand = { readonly type: "BRUSH_DOMAIN_CHANGE_REQUEST"; readonly domain: ChartXDomain; readonly reason: "brush";};domainChartXDomainreason"brush"type"BRUSH_DOMAIN_CHANGE_REQUEST"- 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
ChartBrushChildEvent
typetype 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;};ChartBrushChildInput
typetype ChartBrushChildInput = { readonly brushDomain?: ChartXDomain; readonly defaultBrushDomain?: ChartXDomain; readonly bounds?: ChartXDomain;};boundsChartXDomainbrushDomainChartXDomaindefaultBrushDomainChartXDomain- Name
bounds- Kind
- property
- Type
ChartXDomain- Requirement
- optional
- Name
brushDomain- Kind
- property
- Type
ChartXDomain- Requirement
- optional
- Name
defaultBrushDomain- Kind
- property
- Type
ChartXDomain- Requirement
- optional
ChartBrushChildState
typetype ChartBrushChildState = { readonly value: "idle" | "brushing"; readonly context: { readonly mode: BindingMode; readonly domain: ChartXDomain; readonly draft: ChartXDomain; };};context{
readonly mode: BindingMode;
readonly domain: ChartXDomain;
readonly draft: ChartXDomain;
}value"idle" | "brushing"- 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
type ChartDomainChangeReason = "brush" | "wheel" | "pan" | "pinch" | "keyboard" | "programmatic";ChartDomainScalar
typeJSON-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.
type ChartDomainScalar = string | number;type ChartKeyboardChildCommand = ChartActiveTargetChangeCommand | ChartAnnounceCommand;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[];};type ChartKeyboardChildInput = { readonly orderedIds?: readonly string[];};orderedIdsreadonly string[]- Name
orderedIds- Kind
- property
- Type
readonly string[]- Requirement
- optional
type ChartKeyboardChildState = { readonly value: "ready"; readonly context: { readonly orderedIds: readonly string[]; readonly activeIndex: number | null; };};context{
readonly orderedIds: readonly string[];
readonly activeIndex: number | null;
}value"ready"- Name
context- Kind
- property
- Type
{ readonly orderedIds: readonly string[]; readonly activeIndex: number | null; }- Requirement
- required
- Name
value- Kind
- property
- Type
"ready"- Requirement
- required
type ChartLegendChangeReason = "pointer" | "keyboard" | "programmatic";type ChartLegendChildCommand = { readonly type: "HIDDEN_SERIES_CHANGE_REQUEST"; readonly ids: readonly string[]; readonly reason: ChartLegendChangeReason;};idsreadonly string[]reasonChartLegendChangeReasontype"HIDDEN_SERIES_CHANGE_REQUEST"- 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
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[];};type ChartLegendChildInput = { readonly hiddenSeries?: readonly string[]; readonly defaultHiddenSeries?: readonly string[]; readonly seriesIds?: readonly string[];};defaultHiddenSeriesreadonly string[]seriesIdsreadonly string[]- 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
type ChartLegendChildState = { readonly value: "ready"; readonly context: { readonly mode: BindingMode; readonly hiddenSeries: readonly string[]; };};context{
readonly mode: BindingMode;
readonly hiddenSeries: readonly string[];
}value"ready"- Name
context- Kind
- property
- Type
{ readonly mode: BindingMode; readonly hiddenSeries: readonly string[]; }- Requirement
- required
- Name
value- Kind
- property
- Type
"ready"- Requirement
- required
ChartShellChildName
typetype ChartShellChildName = (typeof CHART_SHELL_CHILD_NAMES)[number];ChartShellCommand
typetype ChartShellCommand = ChartTooltipChildCommand | ChartLegendChildCommand | SelectionCommand | ChartBrushChildCommand | ChartZoomChildCommand | ChartKeyboardChildCommand;ChartShellContext
typetype 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;};brushChartBrushChildState | nullkeyboardChartKeyboardChildState | nulllegendChartLegendChildState | nullselectionSelectionMachineState | nulltooltipChartTooltipChildState | nullzoomChartZoomChildState | null- 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
export declare const ChartShellDiagnosticCodes: readonly DiagnosticCatalogueEntry[];ChartShellEvent
typetype ChartShellEvent = ChartTooltipChildEvent | ChartLegendChildEvent | SelectionEvent | ChartBrushChildEvent | ChartZoomChildEvent | ChartKeyboardChildEvent;ChartShellInput
typetype 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;};brushChartBrushChildInputchildrenreadonly string[]keyboardChartKeyboardChildInputlegendChartLegendChildInputselectionSelectionInputtooltipChartTooltipChildInputzoomChartZoomChildInputzoomOnBrushboolean- 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.
chartShellMachine
valueexport declare const chartShellMachine: ChartShellMachine;ChartShellMachine
typetype ChartShellMachine = Machine<ChartShellInput, ChartShellStateValue, ChartShellContext, ChartShellEvent, ChartShellCommand>;type ChartShellMachineState = MachineState<ChartShellStateValue, ChartShellContext>;chartShellReplaySequence
valueexport declare const chartShellReplaySequence: readonly ChartShellEvent[];chartShellSelectors
valueexport 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[];};activeId(snapshot: ChartShellSnapshot) => string | nullbrush(snapshot: ChartShellSnapshot) => ChartBrushChildState | nullbrushDomain(snapshot: ChartShellSnapshot) => {
readonly start: ChartDomainScalar;
readonly end: ChartDomainScalar;
} | nullbrushDraft(snapshot: ChartShellSnapshot) => {
readonly start: ChartDomainScalar;
readonly end: ChartDomainScalar;
} | nullcandidateId(snapshot: ChartShellSnapshot) => string | nullenabledChildren(snapshot: ChartShellSnapshot) => readonly ChartShellChildName[]keyboard(snapshot: ChartShellSnapshot) => ChartKeyboardChildState | nullkeyboardActiveId(snapshot: ChartShellSnapshot) => string | nullkeyboardActiveIndex(snapshot: ChartShellSnapshot) => number | nulllegend(snapshot: ChartShellSnapshot) => ChartLegendChildState | nullselectedIds(snapshot: ChartShellSnapshot) => SelectionValueselection(snapshot: ChartShellSnapshot) => SelectionMachineState | nulltooltip(snapshot: ChartShellSnapshot) => ChartTooltipChildState | null- 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
ChartShellSnapshot
typetype ChartShellSnapshot = Snapshot<ChartShellStateValue, ChartShellContext>;ChartShellStateValue
typetype ChartShellStateValue = "ready";ChartTargetReason
typetype ChartTargetReason = "pointer" | "focus" | "keyboard" | "programmatic";type ChartTooltipChildCommand = TooltipCommand | ChartActiveTargetChangeCommand;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;type ChartTooltipChildInput = TooltipInput & { readonly activeId?: string | null; readonly defaultActiveId?: string | null;};activeIdstring | nulldefaultActiveIdstring | null- Name
activeId- Kind
- property
- Type
string | null- Requirement
- optional
- Name
defaultActiveId- Kind
- property
- Type
string | null- Requirement
- optional
type ChartTooltipChildState = { readonly lifecycle: MachineState<TooltipStateValue, TooltipContext>; readonly candidateId: string | null; readonly activeId: string | null; readonly targetMode: BindingMode;};activeIdstring | nullcandidateIdstring | nulllifecycleMachineState<TooltipStateValue, TooltipContext>targetModeBindingMode- 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
ChartXDomain
typetype ChartXDomain = { readonly start: ChartDomainScalar; readonly end: ChartDomainScalar;} | null;type ChartXDomainChangeDetail = { readonly domain: ChartXDomain; readonly reason: ChartDomainChangeReason;};domainChartXDomainreasonChartDomainChangeReason- Name
domain- Kind
- property
- Type
ChartXDomain- Requirement
- required
- Name
reason- Kind
- property
- Type
ChartDomainChangeReason- Requirement
- required
type ChartZoomChildCommand = { readonly type: "ZOOM_DOMAIN_CHANGE_REQUEST"; readonly domain: ChartXDomain; readonly reason: ChartDomainChangeReason;};domainChartXDomainreasonChartDomainChangeReasontype"ZOOM_DOMAIN_CHANGE_REQUEST"- 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
ChartZoomChildEvent
typetype ChartZoomChildEvent = { readonly type: "ZOOM_REQUEST"; readonly domain: ChartXDomain; readonly reason: ChartDomainChangeReason;} | { readonly type: "ZOOM_RESET";} | { readonly type: "ZOOM_DOMAIN_SYNC"; readonly domain: ChartXDomain;};ChartZoomChildInput
typetype ChartZoomChildInput = { readonly domain?: ChartXDomain; readonly defaultDomain?: ChartXDomain; readonly bounds?: ChartXDomain;};boundsChartXDomaindefaultDomainChartXDomaindomainChartXDomain- Name
bounds- Kind
- property
- Type
ChartXDomain- Requirement
- optional
- Name
defaultDomain- Kind
- property
- Type
ChartXDomain- Requirement
- optional
- Name
domain- Kind
- property
- Type
ChartXDomain- Requirement
- optional
ChartZoomChildState
typetype ChartZoomChildState = { readonly value: "ready"; readonly context: { readonly mode: BindingMode; readonly domain: ChartXDomain; };};context{
readonly mode: BindingMode;
readonly domain: ChartXDomain;
}value"ready"- Name
context- Kind
- property
- Type
{ readonly mode: BindingMode; readonly domain: ChartXDomain; }- Requirement
- required
- Name
value- Kind
- property
- Type
"ready"- Requirement
- required
childEnabled
functiondeclare function childEnabled(enabled: readonly ChartShellChildName[], name: ChartShellChildName): boolean;enabledreadonly ChartShellChildName[]nameChartShellChildNamereturnboolean- 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
clampChartXDomain
functiondeclare function clampChartXDomain(domain: ChartXDomain, bounds: ChartXDomain): ChartXDomain;domainChartXDomainboundsChartXDomainreturnChartXDomain- 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
clampPanChartXDomain
functionPan keeps the requested span and shifts it inside bounds. Non-numeric domains clamp per endpoint.
declare function clampPanChartXDomain(domain: ChartXDomain, bounds: ChartXDomain): ChartXDomain;domainChartXDomainboundsChartXDomainreturnChartXDomain- 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
EMPTY_CHILD_NAMES
valueexport declare const EMPTY_CHILD_NAMES: readonly ChartShellChildName[];EMPTY_ORDERED_IDS
valueexport declare const EMPTY_ORDERED_IDS: readonly string[];EMPTY_SELECTION_IDS
valueexport declare const EMPTY_SELECTION_IDS: SelectionValue;isBrushChildEvent
functiondeclare function isBrushChildEvent(event: { readonly type: string;}): event is ChartBrushChildEvent;event{
readonly type: string;
}returnevent is ChartBrushChildEvent- Name
event- Kind
- parameter
- Type
{ readonly type: string; }- Requirement
- required
- Name
return- Kind
- return value
- Type
event is ChartBrushChildEvent- Requirement
- n/a
isChartShellChildName
functiondeclare function isChartShellChildName(value: string): value is ChartShellChildName;valuestringreturnvalue is ChartShellChildName- Name
value- Kind
- parameter
- Type
string- Requirement
- required
- Name
return- Kind
- return value
- Type
value is ChartShellChildName- Requirement
- n/a
isKeyboardChildEvent
functiondeclare function isKeyboardChildEvent(event: { readonly type: string;}): event is ChartKeyboardChildEvent;event{
readonly type: string;
}returnevent is ChartKeyboardChildEvent- Name
event- Kind
- parameter
- Type
{ readonly type: string; }- Requirement
- required
- Name
return- Kind
- return value
- Type
event is ChartKeyboardChildEvent- Requirement
- n/a
isLegendChildEvent
functiondeclare function isLegendChildEvent(event: { readonly type: string;}): event is ChartLegendChildEvent;event{
readonly type: string;
}returnevent is ChartLegendChildEvent- Name
event- Kind
- parameter
- Type
{ readonly type: string; }- Requirement
- required
- Name
return- Kind
- return value
- Type
event is ChartLegendChildEvent- Requirement
- n/a
isTooltipChildEvent
functiondeclare function isTooltipChildEvent(event: { readonly type: string;}): event is ChartTooltipChildEvent;event{
readonly type: string;
}returnevent is ChartTooltipChildEvent- Name
event- Kind
- parameter
- Type
{ readonly type: string; }- Requirement
- required
- Name
return- Kind
- return value
- Type
event is ChartTooltipChildEvent- Requirement
- n/a
isValidChartXDomain
functiondeclare function isValidChartXDomain(domain: ChartXDomain): boolean;domainChartXDomainreturnboolean- Name
domain- Kind
- parameter
- Type
ChartXDomain- Requirement
- required
- Name
return- Kind
- return value
- Type
boolean- Requirement
- n/a
isZeroWidthChartXDomain
functiondeclare function isZeroWidthChartXDomain(domain: ChartXDomain): boolean;domainChartXDomainreturnboolean- Name
domain- Kind
- parameter
- Type
ChartXDomain- Requirement
- required
- Name
return- Kind
- return value
- Type
boolean- Requirement
- n/a
isZoomChildEvent
functiondeclare function isZoomChildEvent(event: { readonly type: string;}): event is ChartZoomChildEvent;event{
readonly type: string;
}returnevent is ChartZoomChildEvent- Name
event- Kind
- parameter
- Type
{ readonly type: string; }- Requirement
- required
- Name
return- Kind
- return value
- Type
event is ChartZoomChildEvent- Requirement
- n/a
normalizeChartXDomain
functionOrder endpoints so start <= end when they share a type. Mixed types pass through.
declare function normalizeChartXDomain(domain: ChartXDomain): ChartXDomain;domainChartXDomainreturnChartXDomain- Name
domain- Kind
- parameter
- Type
ChartXDomain- Requirement
- required
- Name
return- Kind
- return value
- Type
ChartXDomain- Requirement
- n/a
sameChartXDomain
functiondeclare function sameChartXDomain(left: ChartXDomain, right: ChartXDomain): boolean;leftChartXDomainrightChartXDomainreturnboolean- 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
functiondeclare function sameChildNames(left: readonly ChartShellChildName[], right: readonly ChartShellChildName[]): boolean;leftreadonly ChartShellChildName[]rightreadonly ChartShellChildName[]returnboolean- 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
sameOrderedIds
functiondeclare function sameOrderedIds(left: readonly string[], right: readonly string[]): boolean;leftreadonly string[]rightreadonly string[]returnboolean- 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
functiondeclare function sameSelectionIds(left: SelectionValue, right: SelectionValue): boolean;leftSelectionValuerightSelectionValuereturnboolean- 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
type SelectionChangeDetail = { readonly selectedIds: SelectionValue; readonly reason: SelectionChangeReason;};reasonSelectionChangeReasonselectedIdsSelectionValue- Name
reason- Kind
- property
- Type
SelectionChangeReason- Requirement
- required
- Name
selectedIds- Kind
- property
- Type
SelectionValue- Requirement
- required
type SelectionChangeReason = "pointer" | "keyboard" | "programmatic";SelectionCommand
typetype SelectionCommand = CommandObject & { readonly type: "SELECTION_CHANGE_REQUEST"; readonly selectedIds: SelectionValue; readonly reason: SelectionChangeReason;};reasonSelectionChangeReasonselectedIdsSelectionValuetypestring- Name
reason- Kind
- property
- Type
SelectionChangeReason- Requirement
- required
- Name
selectedIds- Kind
- property
- Type
SelectionValue- Requirement
- required
- Name
type- Kind
- property
- Type
string- Requirement
- required
SelectionEvent
typetype 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
interfaceinterface SelectionInput { readonly mode: SelectionMode; readonly selectedIds?: SelectionValue; readonly defaultSelectedIds?: SelectionValue; readonly orderedIds: readonly string[]; readonly disabledIds?: readonly string[];}defaultSelectedIdsSelectionValuedisabledIdsreadonly string[]modeSelectionModeorderedIdsreadonly string[]selectedIdsSelectionValue- 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
selectionMachine
valueexport declare const selectionMachine: SelectionMachine;SelectionMode
typetype SelectionMode = "none" | "single" | "multiple";selectionSelectors
valueexport declare const selectionSelectors: { selectedIds: (snapshot: SelectionSnapshot) => SelectionValue; anchorId: (snapshot: SelectionSnapshot) => string | null; bindingMode: (snapshot: SelectionSnapshot) => BindingMode; isSelected: (snapshot: SelectionSnapshot, id: string) => boolean;};anchorId(snapshot: SelectionSnapshot) => string | nullbindingMode(snapshot: SelectionSnapshot) => BindingModeisSelected(snapshot: SelectionSnapshot, id: string) => booleanselectedIds(snapshot: SelectionSnapshot) => SelectionValue- 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
SelectionValue
typetype SelectionValue = readonly string[];stepKeyboardIndex
functionClamp step matching live `prepareChartModel().navigate`: null + forward → first; null + backward → last; unknown id + either → first.
declare function stepKeyboardIndex(orderedIds: readonly string[], currentIndex: number | null, direction: 1 | -1): number | null;orderedIdsreadonly string[]currentIndexnumber | nulldirection1 | -1returnnumber | null- 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
tooltipInputFromShell
functiondeclare function tooltipInputFromShell(input: ChartTooltipChildInput | undefined): TooltipInput;inputChartTooltipChildInput | undefinedreturnTooltipInput- Name
input- Kind
- parameter
- Type
ChartTooltipChildInput | undefined- Requirement
- required
- Name
return- Kind
- return value
- Type
TooltipInput- Requirement
- n/a