Skip to content

Documentation / @finchart/core / index / PlotOptionsPatch

Interface: PlotOptionsPatch ​

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

What's passed to applyOptions. Anything omitted is left alone. The unit of replacement for a given field differs per field, and is documented below — if everything merged by field, there'd be no way to reset a style back to its default; if everything replaced wholesale, changing one margin would require writing out all four sides.

Properties ​

axis? ​

optional axis?: object

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

Field merge, per axis. Giving only x leaves y untouched.

x? ​

optional x?: XAxisOptions

y? ​

optional y?: YAxisOptions


axisDrag? ​

optional axisDrag?: boolean

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


maxBarSpacing? ​

optional maxBarSpacing?: number | null

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


minBarSpacing? ​

optional minBarSpacing?: number | null

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

null clears the override. The default for these two is not a number the chart owns — it is whatever the x mapping decides (barSpacingDefaults), so there is no value to write back to get it. null removes the standing value and the mapping is read again; undefined is "not given" like every other field here. 0 is a value: "no limit on this side".


padding? ​

optional padding?: Partial<Padding>

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

Field merge. You don't have to write out all four sides. Only the given sides change.


paneGap? ​

optional paneGap?: number

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


preserveLiveRightEdgeOnZoomOut? ​

optional preserveLiveRightEdgeOnZoomOut?: boolean

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


resizablePanes? ​

optional resizablePanes?: boolean

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


rightOffset? ​

optional rightOffset?: number

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


shiftVisibleRangeOnNewBar? ​

optional shiftVisibleRangeOnNewBar?: boolean

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


showGrid? ​

optional showGrid?: boolean

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


style? ​

optional style?: object

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

Wholesale replacement. What you give becomes this chart's entire style.

The reason this one doesn't merge is that it has to be resettable — style: { grid: {} } means "back to default", and a merge could never say that. This is the path back when React's gridStyle prop disappears.

grid? ​

optional grid?: Partial<LineStyle>