Interface: NumberAxisOptions
Extends
AxisBaseOptions
Properties
bandSpan?
optionalbandSpan?:number
Width of a bar in axis units — the numeric counterpart of the same option on the time axis. Without it the step is measured off the data.
crossLines?
optionalcrossLines?:AxisCrossLineOptions[]
Inherited from
AxisBaseOptions.crossLines
gridLine?
optionalgridLine?:Switchable&object
Type Declaration
lineDash?
optionallineDash?:number[]
stroke?
optionalstroke?:string
width?
optionalwidth?:number
Inherited from
AxisBaseOptions.gridLine
interval?
optionalinterval?:object
minSpacing?
optionalminSpacing?:number
Minimum spacing between labels, px.
values?
optionalvalues?:unknown[]
Explicit tick values.
Inherited from
AxisBaseOptions.interval
keys?
optionalkeys?:string[]
Which series this axis carries, by their value field (yField, or the low/high/OHLC fields of the multi-field series) or by series id. Only meaningful with two value axes — it is what tells left from right. A series matching no axis falls back to the first value axis without keys.
Inherited from
AxisBaseOptions.keys
label?
optionallabel?:Switchable&FontOptions&object
Type Declaration
avoidCollisions?
optionalavoidCollisions?:boolean
Skip overlapping labels (true by default).
ellipsis?
optionalellipsis?:string
The mark standing where the text was cut: '..' by default, '…' reads too.
format?
optionalformat?:string
Serializable format string (',.2f', '.0%', '%d %b').
formatter?
optionalformatter?: (params) =>string
Parameters
params
AxisLabelFormatterParams
Returns
string
insideAlign?
optionalinsideAlign?:AxisInsideLabelAlign
Inside placement on a band axis: 'element' (default) — the label hugs its own element, insideGap away from it; 'gap' — the label is centred in the gap between elements.
insideGap?
optionalinsideGap?:number
Inside placement: gap to the element the label belongs to (and to the one before it).
insideSpacing?
optionalinsideSpacing?:number
Inside placement: indent from the axis into the plot area.
maxWidth?
optionalmaxWidth?:number
Widest a label may be, px. Anything longer is cut with label.ellipsis whatever overflow says; on a vertical axis this also caps the room the labels take away from the plot.
overflow?
optionaloverflow?:AxisLabelOverflow
What a label that does not fit its room does: 'thin' (default) — the crowded ones are dropped and the rest are drawn whole; 'ellipsis' — every label stays and is cut to the room between two ticks, so long category names stop running into their neighbours and the tick lines between them. Only the horizontal axis crowds this way; on a vertical one the cut is what maxWidth asks for.
placement?
optionalplacement?:AxisLabelPlacement
'outside' (default) — labels next to the axis line; 'inside' — inside the plot area: on a vertical axis above the band (over the bar), on a horizontal one along the inner edge. Inside labels reserve no space.
spacing?
optionalspacing?:number
Gap from the axis line (from the tick, when ticks are on). Outside labels only.
Inherited from
AxisBaseOptions.label
line?
optionalline?:Switchable&object
The axis line itself, styled like the grid: colour, width and dash pattern.
Type Declaration
lineDash?
optionallineDash?:number[]
Dash pattern, as gridLine.lineDash; an empty array draws a solid line.
stroke?
optionalstroke?:string
width?
optionalwidth?:number
Inherited from
AxisBaseOptions.line
max?
optionalmax?:number
min?
optionalmin?:number
nice?
optionalnice?:boolean
Round the domain to "nice" boundaries (true by default).
position?
optionalposition?:AxisPosition
Inherited from
AxisBaseOptions.position
tick?
optionaltick?:Switchable&object
Type Declaration
color?
optionalcolor?:string
lineDash?
optionallineDash?:number[]
Dash pattern of a tick mark; solid by default.
size?
optionalsize?:number
Tick length, px (6 by default).
stroke?
optionalstroke?:string
Tick colour; color is an alias of it.
width?
optionalwidth?:number
Inherited from
AxisBaseOptions.tick
title?
optionaltitle?:Switchable&FontOptions&object
Type Declaration
text?
optionaltext?:string
Inherited from
AxisBaseOptions.title
type
type:
"number"