@askrjs/charts
Exports from the declarations published in @askrjs/charts. Signatures reflect the published artifact.
Exports
This entrypoint publishes 69 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.
appendPlotRowstype
appendPlotRows: <Row>(rows: readonly Row[], appended: readonly Row[] | Row) => readonly Row[]Appends one or more rows to rows, returning a new frozen array (or rows if nothing was added).
ArcPropstype
ArcProps: anyProps for Plot.Arc.
category- category?: RowColorChannelInput<Row> | undefined;
colorScale- colorScale?: string | undefined;
cornerRadius- cornerRadius?: number | undefined;
data- data?: PlotData<Row> | undefined;
endAngle- endAngle?: number | undefined;
fill- fill?: RowColorChannelInput<Row> | undefined;
hidden- hidden?: boolean | undefined;
innerRadius- innerRadius?: number | undefined;
key- key?: PlotRowKey<Row> | undefined;
max- max?: number | undefined;
min- min?: number | undefined;
opacity- opacity?: number | undefined;
outerRadius- outerRadius?: number | undefined;
padAngle- padAngle?: number | undefined;
startAngle- startAngle?: number | undefined;
stroke- stroke?: RowColorChannelInput<Row> | undefined;
title- title?: RowTextChannelInput<Row> | undefined;
transform- transform?: RowTransform<Row> | readonly RowTransform<Row>[] | undefined;
value- value: RowNumericChannelInput<Row>;
xScale- xScale?: string | undefined;
yScale- yScale?: string | undefined;
AreaPropstype
AreaProps: anyProps for Plot.Area.
baseline- baseline?: number | undefined;
colorScale- colorScale?: string | undefined;
curve- curve?: "step" | "linear" | "monotone" | undefined;
data- data?: PlotData<Row> | undefined;
fill- fill?: RowColorChannelInput<Row> | undefined;
hidden- hidden?: boolean | undefined;
key- key?: PlotRowKey<Row> | undefined;
normalize- normalize?: boolean | undefined;
opacity- opacity?: number | undefined;
stack- stack?: boolean | CategoricalField<Row> | RowAccessor<Row, PlotScalar> | undefined;
stroke- stroke?: RowColorChannelInput<Row> | undefined;
title- title?: RowTextChannelInput<Row> | undefined;
transform- transform?: RowTransform<Row> | readonly RowTransform<Row>[] | undefined;
x- x: BinnedScaleChannelInput<Row>;
x2- x2?: unknown;
xScale- xScale?: string | undefined;
y- y: AggregatedNumericChannelInput<Row>;
y2- y2?: RowNumericChannelInput<Row> | undefined;
yScale- yScale?: string | undefined;
AxisOrientationtype
AxisOrientation: "top" | "right" | "bottom" | "left"The side of the plot an axis is rendered on.
AxisPropstype
AxisProps: anyProps for Plot.Axis.
axis- axis?: CartesianAxis | undefined;
grid- grid?: boolean | undefined;
label- label?: string | undefined;
orient- orient?: AxisOrientation | undefined;
scale- scale?: string | undefined;
tickCount- tickCount?: number | undefined;
tickFormat- tickFormat?: ((value: ScaleValue) => string) | undefined;
BarPropstype
BarProps: anyProps for Plot.Bar.
colorScale- colorScale?: string | undefined;
data- data?: PlotData<Row> | undefined;
fill- fill?: RowColorChannelInput<Row> | undefined;
hidden- hidden?: boolean | undefined;
inset- inset?: number | undefined;
key- key?: PlotRowKey<Row> | undefined;
max- max?: number | undefined;
min- min?: number | undefined;
normalize- normalize?: boolean | undefined;
opacity- opacity?: number | undefined;
orientation- orientation?: "vertical" | "horizontal" | undefined;
radius- radius?: number | undefined;
stack- stack?: boolean | CategoricalField<Row> | RowAccessor<Row, PlotScalar> | undefined;
stroke- stroke?: RowColorChannelInput<Row> | undefined;
title- title?: RowTextChannelInput<Row> | undefined;
transform- transform?: RowTransform<Row> | readonly RowTransform<Row>[] | undefined;
x- x: BinnedScaleChannelInput<Row>;
x2- x2?: unknown;
xScale- xScale?: string | undefined;
y- y: AggregatedNumericChannelInput<Row>;
y2- y2?: unknown;
yScale- yScale?: string | undefined;
bintype
bin: { <Field extends string>(input: Field, options?: BinOptions): ChannelExpression<number | Date, Field, "bin">; <Row>(input: ChannelInput<Row, number | Date>, options?: BinOptions): ChannelExpression<number | Date, never, "bin">; }Bins a numeric or temporal channel into discrete intervals.
BinOptionstype
BinOptions: anyOptions for {@link bin }.
thresholds- thresholds?: number | readonly number[];
interval- interval?: number;
domain- domain?: readonly [number | Date, number | Date];
BrushPropstype
BrushProps: anyProps for Plot.Brush.
axis- axis?: "x" | "y" | "xy" | undefined;
modifier- modifier?: "none" | "shift" | undefined;
CartesianAxistype
CartesianAxis: "x" | "y"A Cartesian axis identifier.
CellPropstype
CellProps: anyProps for Plot.Cell.
colorScale- colorScale?: string | undefined;
data- data?: PlotData<Row> | undefined;
fill- fill?: RowColorChannelInput<Row> | undefined;
hidden- hidden?: boolean | undefined;
inset- inset?: number | undefined;
key- key?: PlotRowKey<Row> | undefined;
opacity- opacity?: number | undefined;
stroke- stroke?: RowColorChannelInput<Row> | undefined;
title- title?: RowTextChannelInput<Row> | undefined;
transform- transform?: RowTransform<Row> | readonly RowTransform<Row>[] | undefined;
value- value?: RowNumericChannelInput<Row> | undefined;
x- x: RowScaleChannelInput<Row>;
x2- x2?: unknown;
xScale- xScale?: string | undefined;
y- y: RowScaleChannelInput<Row>;
y2- y2?: unknown;
yScale- yScale?: string | undefined;
constanttype
constant: <Value>(value: Value) => ChannelExpression<Value, never, "constant">A channel expression that always resolves to the same fixed value for every row.
counttype
count: () => ChannelExpression<number, never, "count">Counts the number of rows in each group.
createPlottype
createPlot: <Row>() => PlotFactory<Row>Creates a self-contained set of plot components (Root, marks, scales, and
annotations) bound to a single row type.
const Plot = createPlot<{ x: number; y: number }>();
<Plot.Root data={rows} rowKey="x" label="Example">
<Plot.Line x="x" y="y" />
</Plot.Root>CrosshairPropstype
CrosshairProps: anyProps for Plot.Crosshair.
axes- axes?: "x" | "y" | "xy" | undefined;
filterRowstype
filterRows: <Row>(predicate: (row: Readonly<Row>, index: number) => boolean) => RowTransform<Row>A row transform that keeps only rows for which predicate returns true.
FollowLatesttype
FollowLatest: number | FollowLatestRows | FollowLatestTime<Row>RootProps.followLatest shorthand: a bare number is treated as a row count
(equivalent to { rows: n }).
FollowLatestRowstype
FollowLatestRows: anyKeep only the most recent N rows; see {@link FollowLatest}.
rows- rows: number;
FollowLatestTimetype
FollowLatestTime: anyKeep only rows within a trailing time window of a temporal field; see {@link FollowLatest}.
durationMs- durationMs: number;
field- field: TemporalField<Row> | RowAccessor<Row, Date>;
GridPropstype
GridProps: anyProps for Plot.Grid.
axis- axis?: CartesianAxis | undefined;
scale- scale?: string | undefined;
tickCount- tickCount?: number | undefined;
grouptype
group: { <Field extends string>(input: Field): ChannelExpression<unknown, Field, "group">; <Row, Value>(input: ChannelInput<Row, Value>): ChannelExpression<Value, never, "group">; }Groups rows by a channel's distinct values.
LegendPropstype
LegendProps: anyProps for Plot.Legend.
interactive- interactive?: boolean | undefined;
label- label?: string | undefined;
position- position?: "top" | "right" | "bottom" | "left" | undefined;
scale- scale?: string | undefined;
LinePropstype
LineProps: anyProps for Plot.Line.
colorScale- colorScale?: string | undefined;
curve- curve?: "step" | "linear" | "monotone" | undefined;
dash- Explicit stroke dash pattern. When omitted, a multi-series line mark cycles accessible dash patterns; pass an empty array to keep every series solid.
data- data?: PlotData<Row> | undefined;
defined- defined?: RowAccessor<Row, boolean> | undefined;
fill- fill?: RowColorChannelInput<Row> | undefined;
hidden- hidden?: boolean | undefined;
key- key?: PlotRowKey<Row> | undefined;
opacity- opacity?: number | undefined;
stroke- stroke?: RowColorChannelInput<Row> | undefined;
strokeWidth- strokeWidth?: number | undefined;
title- title?: RowTextChannelInput<Row> | undefined;
transform- transform?: RowTransform<Row> | readonly RowTransform<Row>[] | undefined;
x- x: RowScaleChannelInput<Row>;
x2- x2?: unknown;
xScale- xScale?: string | undefined;
y- y: RowNumericChannelInput<Row>;
y2- y2?: unknown;
yScale- yScale?: string | undefined;
meantype
mean: { <Field extends string>(input: Field): ChannelExpression<number, Field, "mean">; <Row>(input: NumericChannelInput<Row>): ChannelExpression<number, never, "mean">; }Averages a numeric channel across each group.
MeterSemanticstype
MeterSemantics: anyARIA meter role semantics applied to the plot's graphic region.
role- role: "meter";
min- min: number;
max- max: number;
value- value: number;
valueText- valueText?: string;
movingAveragetype
movingAverage: { <Field extends string>(input: Field, options: Omit<MovingWindowOptions, "operation">): ChannelExpression<number, Field, "moving-average">; <Row>(input: NumericChannelInput<Row>, options: Omit<MovingWindowOptions, "operation">): ChannelExpression<number, never, "moving-average">; }Shorthand for {@link movingWindow} with operation: "mean".
movingWindowtype
movingWindow: { <Field extends string>(input: Field, options: MovingWindowOptions): ChannelExpression<number, Field, "moving-window">; <Row>(input: NumericChannelInput<Row>, options: MovingWindowOptions): ChannelExpression<number, never, "moving-window">; }Applies a sliding-window aggregate (sum, mean, min, or max) to a numeric channel.
MovingWindowOptionstype
MovingWindowOptions: anyOptions for {@link movingWindow } and {@link movingAverage }.
window- window: number;
operation- operation?: WindowOperation;
partial- partial?: boolean;
normalizetype
normalize: { <Field extends string>(input: Field): ChannelExpression<number, Field, "normalize">; <Row>(input: NumericChannelInput<Row>): ChannelExpression<number, never, "normalize">; }Normalizes a numeric channel's values within each group to a 0–1 (or proportional) range.
partitiontype
partition: <Row>(options: PartitionOptions<Row>) => RowTransform<Row>A row transform that builds a hierarchy (e.g. for treemap/icicle-style marks) from flat rows.
PartitionOptionstype
PartitionOptions: anyOptions for {@link partition }.
id- id: RowField<Row> | RowAccessor<Row, PlotKey>;
parentId- parentId?: RowField<Row> | RowAccessor<Row, PlotKey | null | undefined>;
children- children?: RowField<Row> | RowAccessor<Row, readonly Row[] | null | undefined>;
value- value: RowNumericChannelInput<Row>;
padding- padding?: number;
PlotApitype
PlotApi: anyThe imperative API exposed for a rendered plot, delivered via RootProps.onApiChange.
resetView- resetView(): void;
resumeLive- resumeLive(): void;
exportPng- exportPng(options?: PlotPngExportOptions): Promise<Blob>;
exportSvg- exportSvg(options?: PlotSvgExportOptions): string;
exportData- exportData(options?: PlotDataExportOptions): string;
rows- readonly rows: readonly Row[];
PlotDatatype
PlotData: readonly Row[] | (() => readonly Row[])The data a plot consumes: a readonly array of rows, or a function producing one.
PlotDataExportOptionstype
PlotDataExportOptions: anyOptions for {@link PlotApi.exportData}.
view- view?: "current" | "full";
rows- rows?: "source" | "transformed";
scope- scope?: "all" | "visible" | "selected";
format- format?: "csv" | "json";
PlotExportViewOptionstype
PlotExportViewOptions: anyOptions shared by the plot export methods that capture a rendered view.
view- view?: "current" | "full";
background- background?: string | null;
PlotFactorytype
PlotFactory: anyThe set of components returned by {@link createPlot } for a given row type.
Root- readonly Root: PrimitiveComponent<RootProps<Row>>;
Scale- readonly Scale: PrimitiveComponent<ScaleProps>;
Axis- readonly Axis: PrimitiveComponent<AxisProps>;
Grid- readonly Grid: PrimitiveComponent<GridProps>;
Bar- readonly Bar: PrimitiveComponent<BarProps<Row>>;
Line- readonly Line: PrimitiveComponent<LineProps<Row>>;
Area- readonly Area: PrimitiveComponent<AreaProps<Row>>;
Point- readonly Point: PrimitiveComponent<PointProps<Row>>;
Arc- readonly Arc: PrimitiveComponent<ArcProps<Row>>;
Cell- readonly Cell: PrimitiveComponent<CellProps<Row>>;
Rect- readonly Rect: PrimitiveComponent<RectProps<Row>>;
Rule- readonly Rule: PrimitiveComponent<RuleProps<Row>>;
Text- readonly Text: PrimitiveComponent<TextProps<Row>>;
Legend- readonly Legend: PrimitiveComponent<LegendProps>;
Tooltip- readonly Tooltip: PrimitiveComponent<TooltipProps>;
Crosshair- readonly Crosshair: PrimitiveComponent<CrosshairProps>;
Select- readonly Select: PrimitiveComponent<SelectProps>;
Zoom- readonly Zoom: PrimitiveComponent<ZoomProps>;
Brush- readonly Brush: PrimitiveComponent<BrushProps>;
PlotHeadingLeveltype
PlotHeadingLevel: 1 | 2 | 3 | 4 | 5 | 6A valid heading level (h1–h6) for RootProps.headingLevel.
PlotInteractionOrigintype
PlotInteractionOrigin: "pointer" | "keyboard"How a plot interaction was triggered.
PlotInteractionTargettype
PlotInteractionTarget: anyThe mark instance a pointer/keyboard interaction resolved to.
row- readonly row: Row;
key- readonly key: PlotKey;
sourceKeys- readonly sourceKeys: readonly PlotKey[];
markKind- readonly markKind: "bar" | "line" | "area" | "point" | "arc" | "cell" | "rect" | "rule" | "text";
markId- readonly markId: string;
series- readonly series: string | null;
channels- readonly channels: Readonly<Record<string, unknown>>;
origin- readonly origin: PlotInteractionOrigin;
PlotKeytype
PlotKey: string | numberA row identity: any string or number usable as a stable key for a plot row.
PlotPngExportOptionstype
PlotPngExportOptions: anyOptions for {@link PlotApi.exportPng}.
pixelRatio- pixelRatio?: number;
includeOverlays- includeOverlays?: boolean;
PlotRowKeytype
PlotRowKey: FieldOfType<Row, PlotKey> | RowAccessor<Row, PlotKey>How to derive a row's stable {@link PlotKey}: a field name or an accessor function.
PlotSelectiontype
PlotSelection: anyThe set of row keys currently selected via Plot.Select.
keys- keys: readonly PlotKey[];
PlotSummaryContexttype
PlotSummaryContext: anyContext passed to a RootProps.summary function to compute the plot's summary text.
rows- readonly rows: readonly Row[];
sourceRowCount- readonly sourceRowCount: number;
transformedRowCount- readonly transformedRowCount: number;
omittedRowCount- readonly omittedRowCount: number;
visibleRowCount- readonly visibleRowCount: number;
PlotSvgExportOptionstype
PlotSvgExportOptions: anyOptions for {@link PlotApi.exportSvg}.
includeOverlays- includeOverlays?: boolean;
PlotViewtype
PlotView: anyThe visible domain of a plot's scales, used for view/defaultView.
x- x?: readonly [ScaleValue, ScaleValue];
y- y?: readonly [ScaleValue, ScaleValue];
scales- scales?: Readonly<Record<string, readonly [ScaleValue, ScaleValue]>>;
PointPropstype
PointProps: anyProps for Plot.Point.
colorScale- colorScale?: string | undefined;
data- data?: PlotData<Row> | undefined;
fill- fill?: RowColorChannelInput<Row> | undefined;
hidden- hidden?: boolean | undefined;
key- key?: PlotRowKey<Row> | undefined;
opacity- opacity?: number | undefined;
r- r?: number | RowNumericChannelInput<Row> | undefined;
shape- Explicit point shape. When omitted, a multi-series point mark cycles shapes so color is not the only default series encoding.
stroke- stroke?: RowColorChannelInput<Row> | undefined;
title- title?: RowTextChannelInput<Row> | undefined;
transform- transform?: RowTransform<Row> | readonly RowTransform<Row>[] | undefined;
x- x: RowScaleChannelInput<Row>;
x2- x2?: unknown;
xScale- xScale?: string | undefined;
y- y: RowNumericChannelInput<Row>;
y2- y2?: unknown;
yScale- yScale?: string | undefined;
RectPropstype
RectProps: anyProps for Plot.Rect.
colorScale- colorScale?: string | undefined;
data- data?: PlotData<Row> | undefined;
fill- fill?: RowColorChannelInput<Row> | undefined;
hidden- hidden?: boolean | undefined;
key- key?: PlotRowKey<Row> | undefined;
opacity- opacity?: number | undefined;
radius- radius?: number | undefined;
stroke- stroke?: RowColorChannelInput<Row> | undefined;
title- title?: RowTextChannelInput<Row> | undefined;
transform- transform?: RowTransform<Row> | readonly RowTransform<Row>[] | undefined;
x- x?: RowScaleChannelInput<Row> | undefined;
x2- x2?: RowScaleChannelInput<Row> | undefined;
xScale- xScale?: string | undefined;
y- y?: RowScaleChannelInput<Row> | undefined;
y2- y2?: RowScaleChannelInput<Row> | undefined;
yScale- yScale?: string | undefined;
regressiontype
regression: { <Field extends string>(input: Field, options?: { x?: string; method?: "linear"; }): ChannelExpression<number, Field, "regression">; <Row>(input: NumericChannelInput<Row>, options?: RegressionOptions<Row>): ChannelExpression<number, never, "regression">; }Fits a regression curve (currently linear) to a numeric channel against an x channel.
RegressionOptionstype
RegressionOptions: anyOptions for {@link regression }.
x- x?: RowScaleChannelInput<Row>;
method- method?: "linear";
removePlotRowstype
removePlotRows: <Row>(rows: readonly Row[], keys: readonly PlotKey[] | ReadonlySet<PlotKey> | ((row: Readonly<Row>, index: number) => boolean), rowKey?: PlotRowKey<Row>) => readonly Row[]Removes rows matching a predicate, or by key (requires rowKey when keys is an array/set).
Returns the original rows reference unchanged if nothing was removed.
RootPropstype
RootProps: anyProps accepted by a plot factory's Root component.
children- children?: unknown;
class- class?: string | undefined;
data- data: PlotData<Row>;
defaultSelection- defaultSelection?: PlotSelection | undefined;
defaultView- defaultView?: PlotView | undefined;
description- description?: string | undefined;
diagnostics- diagnostics?: boolean | undefined;
empty- empty?: string | undefined;
followLatest- followLatest?: FollowLatest<Row> | undefined;
headingLevel- headingLevel?: PlotHeadingLevel | undefined;
height- height?: number | undefined;
id- id?: string | undefined;
label- label: string;
locale- locale?: string | undefined;
meter- meter?: MeterSemantics | undefined;
onActivate- onActivate?: ((row: Row, key: PlotKey, target: PlotInteractionTarget<Row>) => void) | undefined;
onApiChange- onApiChange?: ((api: PlotApi<Row> | null) => void) | undefined;
onSelectionChange- onSelectionChange?: ((selection: PlotSelection) => void) | undefined;
onViewChange- onViewChange?: ((view: PlotView) => void) | undefined;
rowKey- rowKey: PlotRowKey<Row>;
selection- selection?: PlotSelection | undefined;
style- style?: string | Record<string, string | number | false | null | undefined> | undefined;
summary- summary?: string | ((context: PlotSummaryContext<Row>) => string) | undefined;
title- title?: string | undefined;
view- view?: PlotView | undefined;
width- width?: number | undefined;
RulePropstype
RuleProps: anyProps for Plot.Rule.
colorScale- colorScale?: string | undefined;
dash- dash?: readonly number[] | undefined;
data- data?: PlotData<Row> | undefined;
fill- fill?: RowColorChannelInput<Row> | undefined;
hidden- hidden?: boolean | undefined;
key- key?: PlotRowKey<Row> | undefined;
opacity- opacity?: number | undefined;
stroke- stroke?: RowColorChannelInput<Row> | undefined;
strokeWidth- strokeWidth?: number | undefined;
title- title?: RowTextChannelInput<Row> | undefined;
transform- transform?: RowTransform<Row> | readonly RowTransform<Row>[] | undefined;
x- x?: RowScaleChannelInput<Row> | undefined;
x2- x2?: RowScaleChannelInput<Row> | undefined;
xScale- xScale?: string | undefined;
y- y?: RowScaleChannelInput<Row> | undefined;
y2- y2?: RowScaleChannelInput<Row> | undefined;
yScale- yScale?: string | undefined;
ScalePropstype
ScaleProps: anyProps for Plot.Scale.
base- base?: number | undefined;
channel- channel?: "color" | "x" | "y" | undefined;
clamp- clamp?: boolean | undefined;
constant- constant?: number | undefined;
domain- domain?: readonly ScaleDomainValue[] | undefined;
exponent- exponent?: number | undefined;
name- name?: string | undefined;
nice- nice?: number | boolean | undefined;
padding- padding?: number | undefined;
paddingInner- paddingInner?: number | undefined;
paddingOuter- paddingOuter?: number | undefined;
range- range?: readonly (string | number)[] | undefined;
reverse- reverse?: boolean | undefined;
type- type?: ScaleType | undefined;
unknown- unknown?: string | undefined;
ScaleTypetype
ScaleType: "band" | "point" | "linear" | "power" | "log" | "symlog" | "time" | "utc" | "ordinal-color" | "continuous-color"The scale types supported by Plot.Scale.
ScaleValuetype
ScaleValue: string | number | DateA value usable as a scale domain/range endpoint.
SelectPropstype
SelectProps: anyProps for Plot.Select.
mode- mode?: "single" | "toggle" | undefined;
sortRowstype
sortRows: <Row>(options: SortRowsOptions<Row>) => RowTransform<Row>A row transform that sorts rows by a field or accessor.
SortRowsOptionstype
SortRowsOptions: anyOptions for {@link sortRows }.
by- by: RowField<Row> | RowAccessor<Row, unknown>;
direction- direction?: "ascending" | "descending";
stacktype
stack: { <Field extends string>(input: Field, options?: StackOptions): ChannelExpression<number, Field, "stack">; <Row>(input: NumericChannelInput<Row>, options?: StackOptions): ChannelExpression<number, never, "stack">; }Stacks a numeric channel's values within each group, e.g. for stacked bar/area charts.
StackOptionstype
StackOptions: anyOptions for {@link stack }.
offset- offset?: "zero" | "diverging" | "expand";
order- order?: "none" | "ascending" | "descending" | "inside-out";
sumtype
sum: { <Field extends string>(input: Field): ChannelExpression<number, Field, "sum">; <Row>(input: NumericChannelInput<Row>): ChannelExpression<number, never, "sum">; }Sums a numeric channel across each group.
TextPropstype
TextProps: anyProps for Plot.Text.
align- align?: CanvasTextAlign | undefined;
baseline- baseline?: CanvasTextBaseline | undefined;
colorScale- colorScale?: string | undefined;
data- data?: PlotData<Row> | undefined;
fill- fill?: RowColorChannelInput<Row> | undefined;
font- font?: string | undefined;
hidden- hidden?: boolean | undefined;
key- key?: PlotRowKey<Row> | undefined;
opacity- opacity?: number | undefined;
stroke- stroke?: RowColorChannelInput<Row> | undefined;
text- text: RowTextChannelInput<Row>;
title- title?: RowTextChannelInput<Row> | undefined;
transform- transform?: RowTransform<Row> | readonly RowTransform<Row>[] | undefined;
x- x: RowScaleChannelInput<Row>;
x2- x2?: unknown;
xScale- xScale?: string | undefined;
y- y: RowScaleChannelInput<Row>;
y2- y2?: unknown;
yScale- yScale?: string | undefined;
TooltipPropstype
TooltipProps: anyProps for Plot.Tooltip.
channels- channels?: readonly string[] | undefined;
format- format?: ((record: Readonly<Record<string, unknown>>) => string) | undefined;
mode- mode?: "mark" | "x" | "auto" | undefined;
trimPlotRowstype
trimPlotRows: <Row>(rows: readonly Row[], options: number | TrimPlotRowsOptions<Row>) => readonly Row[]Trims rows down to a trailing window, either by row count or by a duration relative to a
temporal field. A bare number is shorthand for { rows: number }. Returns the original rows
reference unchanged if nothing was trimmed.
TrimPlotRowsOptionstype
TrimPlotRowsOptions: {
rows: number;
} | {
durationMs: number;
field: RowField<Row> | RowAccessor<Row, Date>;
now?: Date | number;
}Options for {@link trimPlotRows}: keep the last rows rows, or rows within durationMs of now.
upsertPlotRowstype
upsertPlotRows: <Row>(rows: readonly Row[], updates: readonly Row[] | Row, rowKey: PlotRowKey<Row>) => readonly Row[]Inserts or updates rows by key: rows whose key matches an existing row replace it in place,
and new keys are appended. Throws if updates or the existing rows contain duplicate keys.
WindowOperationtype
WindowOperation: "sum" | "mean" | "min" | "max"Operations supported by moving-window expressions.
ZoomPropstype
ZoomProps: anyProps for Plot.Zoom.
axes- axes?: "x" | "y" | "xy" | undefined;
max- max?: number | undefined;
min- min?: number | undefined;
pan- pan?: boolean | undefined;
pinch- pinch?: boolean | undefined;
wheel- wheel?: boolean | undefined;