Skip to content

Documentation / @finchart/core / index / PlotDepsOptions

Interface: PlotDepsOptions ​

Defined in: packages/core/src/plot/presets.ts:34

The raw material for building the wiring. Used two ways. createPlotDeps only fills in what's given here; browserDeps in @finchart/dom fills whatever's missing with browser defaults. Either way, a collaborator that's left out means Plot just doesn't do that job — there's no null object standing in, so it doesn't even end up in the bundle.

Properties ​

createAxisLabels? ​

optional createAxisLabels?: AxisLabelsFactory

Defined in: packages/core/src/plot/presets.ts:89

No tick labels are shown if this is left out.


createDecimation? ​

optional createDecimation?: DecimationFactory

Defined in: packages/core/src/plot/presets.ts:65

How to build the decimation strategy. Default is M4 — for every pixel column it picks first, last, min, and max, so extremes never get lost. Only fills a registration whose policy names no strategy — a strategy tied to a point type, like candles, comes with the series itself, and a registration that sets only pointsPerPixel still takes its strategy from here. createDecimation: (coords) => new LttbDecimation(coords)


createDividers? ​

optional createDividers?: DividerFactory

Defined in: packages/core/src/plot/presets.ts:91

No handles are placed between panes if this is left out.


createLayers? ​

optional createLayers?: LayersFactory

Defined in: packages/core/src/plot/presets.ts:87

The surface to draw on. Required in createPlotDeps — this, along with createRenderer and createStyleReader, form the three that answer where, with what, and in what style.


createRenderer? ​

optional createRenderer?: RendererFactory

Defined in: packages/core/src/plot/presets.ts:108

What to draw with. Required in createPlotDeps (one of the three). Pass recordingRenderer to only capture the draw commands.


createScheduler? ​

optional createScheduler?: SchedulerFactory

Defined in: packages/core/src/plot/presets.ts:97

Draws immediately (immediateScheduler) if this is left out — you see the result on the next line after changing state. Coalescing to once per frame is wiring browserDeps supplies via frameScheduler().


createStyleReader? ​

optional createStyleReader?: StyleReaderFactory

Defined in: packages/core/src/plot/presets.ts:103

What style to draw in. Required in createPlotDeps (one of the three). Browser wiring gets a computed style reader (cssReader) from browserDeps; tests and headless code pass a fake, or noStyle.


createTextMeasurer? ​

optional createTextMeasurer?: TextMeasurerFactory

Defined in: packages/core/src/plot/presets.ts:114

How to measure text before drawing it. No measurement happens if this is left out — measurement-based layout falls back to a fixed default. Swap the renderer and swap this alongside it.


createXMapping? ​

optional createXMapping?: XMappingFactory

Defined in: packages/core/src/plot/presets.ts:77

Default is continuous — the domain is data x itself. Financial charts pass barIndexX to switch on a bar-index coordinate system (weekends and closed sessions don't open up gaps).


interactions? ​

optional interactions?: InteractionHandler

Defined in: packages/core/src/plot/presets.ts:81

No input is accepted if this is left out. browserDeps fills it in with mouse/touch.


mainPaneYScale? ​

optional mainPaneYScale?: () => Scale

Defined in: packages/core/src/plot/presets.ts:79

mainPane's value axis, as a factory like xScale. A pane created later gets its own via addPane({ yScale }).

Returns ​

Scale


maxPoints? ​

optional maxPoints?: number

Defined in: packages/core/src/plot/presets.ts:39

A ceiling unrelated to screen width. No default — width decides it. Set it below the width and you can't even draw one point per pixel.


observeResolution? ​

optional observeResolution?: ResolutionObserver

Defined in: packages/core/src/plot/presets.ts:127

How to redraw when the resolution ratio changes. Nothing tracks it if this is left out — a chart that never redraws stays blurry after the window moves to another monitor. browserDeps fills this slot by default (there's nothing to choose for this kind of observation).


observeSize? ​

optional observeSize?: SizeObserver

Defined in: packages/core/src/plot/presets.ts:120

How to track size. The element is something the implementation already knows about — browserDeps's autoSize wires this in as a browser convenience.


pointsPerPixel? ​

optional pointsPerPixel?: number

Defined in: packages/core/src/plot/presets.ts:41

Target data points per pixel. Default is 4 — one pixel column's worth.


tiered? ​

optional tiered?: boolean

Defined in: packages/core/src/plot/presets.ts:48

Whether to keep halved tiers stacked up. Off by default. Turn it on for large static datasets you zoom far out on and view for a long time — it costs up to double the memory, and rebuilds the tiers on every append, which is a net loss for a live chart.


verifyLandings? ​

optional verifyLandings?: boolean

Defined in: packages/core/src/plot/presets.ts:56

Dev-time full re-validation of declared history-page landings. Normal landings validate their new head and structurally retain the manager's own accepted tail; with this on, every adoptHeadRetainingTail result also walks that tail, catching illegal mutation during development and dogfooding. Fresh derived output is fully validated in every build.


xScale? ​

optional xScale?: () => Scale

Defined in: packages/core/src/plot/presets.ts:71

Default is linear. Pass () => new LogScale() for a log axis. A factory, so one wiring can serve several charts without them sharing an axis — the instance is only ever made by the Plot that owns it.

Returns ​

Scale