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?
optionalaxis?:object
Defined in: packages/core/src/plot/types.ts:198
Field merge, per axis. Giving only x leaves y untouched.
x?
optionalx?:XAxisOptions
y?
optionaly?:YAxisOptions
axisDrag?
optionalaxisDrag?:boolean
Defined in: packages/core/src/plot/types.ts:185
maxBarSpacing?
optionalmaxBarSpacing?:number|null
Defined in: packages/core/src/plot/types.ts:196
minBarSpacing?
optionalminBarSpacing?: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?
optionalpadding?: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?
optionalpaneGap?:number
Defined in: packages/core/src/plot/types.ts:181
preserveLiveRightEdgeOnZoomOut?
optionalpreserveLiveRightEdgeOnZoomOut?:boolean
Defined in: packages/core/src/plot/types.ts:184
resizablePanes?
optionalresizablePanes?:boolean
Defined in: packages/core/src/plot/types.ts:182
rightOffset?
optionalrightOffset?:number
Defined in: packages/core/src/plot/types.ts:186
shiftVisibleRangeOnNewBar?
optionalshiftVisibleRangeOnNewBar?:boolean
Defined in: packages/core/src/plot/types.ts:183
showGrid?
optionalshowGrid?:boolean
Defined in: packages/core/src/plot/types.ts:180
style?
optionalstyle?: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?
optionalgrid?:Partial<LineStyle>