Skip to content

Documentation / @finchart/core / index / PlotDeps

Interface: PlotDeps ​

Defined in: packages/core/src/plot/types.ts:217

The collaborators Plot assembles. Series isn't here — it's swappable, so it comes in separately through registration. There's no data collaborator either — each registration builds its own manager, leaving only how to build one. That's why there's no point-type parameter here — Plot<T> figures out what it's drawing from the registration.

Properties ​

createAxisLabels? ​

optional createAxisLabels?: AxisLabelsFactory

Defined in: packages/core/src/plot/types.ts:256

Puts up tick labels. No labels shown if omitted. No null object is used here — the way to turn it off is to not supply it, so that code doesn't even make it into the bundle. This is the slot for a chart with no axis at all, like a sparkline.


createDataManager ​

createDataManager: DataManagerFactory

Defined in: packages/core/src/plot/types.ts:244

Used when a registration builds its own manager. Policy (strategy, density) is decided by whoever knows the point type — registration > Series > the default built here.


createDividers? ​

optional createDividers?: DividerFactory

Defined in: packages/core/src/plot/types.ts:258

Handles between panes. None placed if omitted — height is decided by flex alone.


createLayers ​

createLayers: LayersFactory

Defined in: packages/core/src/plot/types.ts:249

The surface to draw on. The only required collaborator here — no surface, no chart.


createRenderer ​

createRenderer: RendererFactory

Defined in: packages/core/src/plot/types.ts:266

Takes commands and puts them on the surface. Required — there's no such thing as a chart that doesn't draw.


createScheduler? ​

optional createScheduler?: SchedulerFactory

Defined in: packages/core/src/plot/types.ts:285

When to run a render. Immediate if omitted. immediateScheduler is a few lines that know nothing about the DOM, so it isn't a burden for whoever doesn't need it either.


createStyleReader ​

createStyleReader: StyleReaderFactory

Defined in: packages/core/src/plot/types.ts:272

How a style key resolves to a concrete value. Required. A chart without CSS just needs a (name) => string, whether backed by a JS theme object or by constants.


createTextMeasurer? ​

optional createTextMeasurer?: TextMeasurerFactory

Defined in: packages/core/src/plot/types.ts:279

How to measure text before drawing it. Not measured if omitted — layout that needs measurement (like a y-axis width that tracks its longest label) falls back to a fixed default. Swap the renderer and swap this alongside it.


createXMapping? ​

optional createXMapping?: XMappingFactory

Defined in: packages/core/src/plot/types.ts:232

Where data's x lands on screen. Continuous if omitted — the domain is data x itself, and an empty span takes up empty screen space too. If a financial chart wants a bar-index coordinate system (weekends and closed sessions don't open up gaps), pass barIndexX.


interactions? ​

optional interactions?: InteractionHandler

Defined in: packages/core/src/plot/types.ts:264

Accepts mouse/touch. No input is accepted if omitted. Even without it, the pan/zoom API still works, so the host can drive it directly.


mainPaneYScale ​

mainPaneYScale: () => Scale

Defined in: packages/core/src/plot/types.ts:238

mainPane's value axis. Not the default for every pane — a pane created later either gets its own via addPane({ yScale }) or falls back to linear. A factory for the same reason xScale is one.

Returns ​

Scale


observeResolution? ​

optional observeResolution?: ResolutionObserver

Defined in: packages/core/src/plot/types.ts:297

Redraws when the resolution ratio changes. Doesn't track it if omitted. This is split from observeSize because when only the ratio changes, the CSS pixel size stays the same, so observeSize alone has no way to signal that event.


observeSize? ​

optional observeSize?: SizeObserver

Defined in: packages/core/src/plot/types.ts:290

Tracks the container's size. Doesn't track it if omitted.createPlotDeps({ autoSize: true }) is the default wiring.


xScale ​

xScale: () => Scale

Defined in: packages/core/src/plot/types.ts:225

A factory, not an instance — like every other collaborator here. One deps object serves every chart on a page (and React StrictMode mounts twice from one), so a scale instance placed here would be shared: panning one chart would move the other. Each Plot calls this once and owns what it gets.

Returns ​

Scale