Skip to content

Documentation / @finchart/dom / BrowserDepsOptions

Interface: BrowserDepsOptions ​

Defined in: dom/src/browser-deps.ts:22

Extends ​

  • PlotDepsOptions

Properties ​

autoSize? ​

optional autoSize?: boolean

Defined in: dom/src/browser-deps.ts:37

Follows the container's size. Off by default.

Turn it on and size becomes just the initial size — the container decides afterward, so it needs a size of its own from CSS (a height, at least: an empty block is 0 px tall, and a zero size is ignored). To change how it's observed, pass observeSize directly.


createAxisLabels? ​

optional createAxisLabels?: AxisLabelsFactory

Defined in: core/dist/plot/presets.d.mts:76

No tick labels are shown if this is left out.

Inherited from ​

PlotDepsOptions.createAxisLabels


createDecimation? ​

optional createDecimation?: DecimationFactory

Defined in: core/dist/plot/presets.d.mts:52

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)

Inherited from ​

PlotDepsOptions.createDecimation


createDividers? ​

optional createDividers?: DividerFactory

Defined in: core/dist/plot/presets.d.mts:78

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

Inherited from ​

PlotDepsOptions.createDividers


createLayers? ​

optional createLayers?: LayersFactory

Defined in: core/dist/plot/presets.d.mts:74

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.

Inherited from ​

PlotDepsOptions.createLayers


createRenderer? ​

optional createRenderer?: RendererFactory

Defined in: core/dist/plot/presets.d.mts:95

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

Inherited from ​

PlotDepsOptions.createRenderer


createScheduler? ​

optional createScheduler?: SchedulerFactory

Defined in: core/dist/plot/presets.d.mts:84

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().

Inherited from ​

PlotDepsOptions.createScheduler


createStyleReader? ​

optional createStyleReader?: StyleReaderFactory

Defined in: core/dist/plot/presets.d.mts:90

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.

Inherited from ​

PlotDepsOptions.createStyleReader


createTextMeasurer? ​

optional createTextMeasurer?: TextMeasurerFactory

Defined in: core/dist/plot/presets.d.mts:101

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.

Inherited from ​

PlotDepsOptions.createTextMeasurer


createXMapping? ​

optional createXMapping?: XMappingFactory

Defined in: core/dist/plot/presets.d.mts:64

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).

Inherited from ​

PlotDepsOptions.createXMapping


interactions? ​

optional interactions?: InteractionHandler

Defined in: core/dist/plot/presets.d.mts:68

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

Inherited from ​

PlotDepsOptions.interactions


mainPaneYScale? ​

optional mainPaneYScale?: () => Scale

Defined in: core/dist/plot/presets.d.mts:66

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

Returns ​

Scale

Inherited from ​

PlotDepsOptions.mainPaneYScale


maxPoints? ​

optional maxPoints?: number

Defined in: core/dist/plot/presets.d.mts:26

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.

Inherited from ​

PlotDepsOptions.maxPoints


observeResolution? ​

optional observeResolution?: ResolutionObserver

Defined in: core/dist/plot/presets.d.mts:114

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).

Inherited from ​

PlotDepsOptions.observeResolution


observeSize? ​

optional observeSize?: SizeObserver

Defined in: core/dist/plot/presets.d.mts:107

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

Inherited from ​

PlotDepsOptions.observeSize


pointer? ​

optional pointer?: false | PointerInteractionsOptions

Defined in: dom/src/browser-deps.ts:28

Toggles and fine-tuning for pointer input (pan, zoom, kineticScroll…). false means no input at all. Defaults turn everything on at its default value.


pointsPerPixel? ​

optional pointsPerPixel?: number

Defined in: core/dist/plot/presets.d.mts:28

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

Inherited from ​

PlotDepsOptions.pointsPerPixel


tiered? ​

optional tiered?: boolean

Defined in: core/dist/plot/presets.d.mts:35

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.

Inherited from ​

PlotDepsOptions.tiered


verifyLandings? ​

optional verifyLandings?: boolean

Defined in: core/dist/plot/presets.d.mts:43

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.

Inherited from ​

PlotDepsOptions.verifyLandings


xScale? ​

optional xScale?: () => Scale

Defined in: core/dist/plot/presets.d.mts:58

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

Inherited from ​

PlotDepsOptions.xScale