Axis
Spec
Defines a area series in the chart.
Overview
Compatible Specs
Axis
spec can be used multiple times along with any of the following specs:
Global Specs
Specs
Overrides
specType
->SpecType.Axis
chartType
->ChartType.XYAxis
Props
All props can be found via LineSeriesProps
type.
Spec
Props
Inherits Spec
props
id
- Type:
id: AxisId
The id of this axis spec.
gridLine
- Type:
gridLine?: Partial<GridLineStyle>
Style options for grid line.
groupId
- Type:
groupId: GroupId
- Default:
DEFAULT_GLOBAL_ID
The id of the axis group.
hide
- Type:
hide: boolean
Hide this axis
showOverlappingTicks
- Type:
showOverlappingTicks: boolean
shows all ticks and gridlines, including those belonging to labels that got culled due to overlapping with other labels.
showOverlappingLabels
- Type:
showOverlappingLabels: boolean
Shows all labels, also the overlapping ones.
position
- Type:
position: Position
Where the axis appear on the chart
tickFormat
- Type:
tickFormat?: TickFormatter
- Default: Uses first series spec
tickFormat
A function called to format every axis tick value label.
Used in tooltip when no tickFormat
is provided from series spec
labelFormat
- Type:
labelFormat?: TickFormatter
A function called to format every label (excludes tooltip) overrides tickFormat for axis labels
ticks
- Type:
ticks?: number
An approximate count of how many ticks will be generated.
title
- Type:
title?: string
The axis title
style
- Type:
style?: RecursivePartial<Omit<AxisStyle, 'gridLine'>>
Custom style overrides.
domain
- Type:
domain?: YDomainRange
If specified, it constrains the domain for these values.
integersOnly
- Type:
integersOnly?: boolean
Show only integar values.
showDuplicatedTicks
- Type:
showDuplicatedTicks?: boolean
- Default:
false
Show duplicated ticks
timeAxisLayerCount
- Type:
timeAxisLayerCount: number
- Default:
0
- tag:
@alpha
Render a multi-layer time axis. Use 2 or 3 as valid number of layers. Use 0 to use the alternative, one row, time axis.