Skip to main content

AxisSpec

@elastic/chartsExports


@elastic/charts / AxisSpec

Interface: AxisSpec

This spec describe the configuration for a chart axis.

Contents

Extends

Properties

chartType

chartType: "xy_axis"

Chart type define the type of chart that use this spec

Overrides

Spec.chartType

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:714


domain?

domain?: YDomainRange

If specified, it constrains the domain for these values

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:752


gridLine?

gridLine?: Partial<GridLineStyle>

Style options for grid line

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:718


groupId

groupId: string

The ID of the axis group

Default Value

{@link DEFAULT_GLOBAL_ID}

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:723


hide

hide: boolean

Hide this axis

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:725


id

id: string

The ID of the spec

Overrides

Spec.id

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:716


integersOnly?

integersOnly?: boolean

Show only integar values

Deprecated

use maximumFractionDigits instead

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:757


labelFormat?

labelFormat?: TickFormatter<any>

A function called to format every label (excludes tooltip)

overrides tickFormat for axis labels

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:744


maximumFractionDigits?

maximumFractionDigits?: number

Max fractional digit to limit precision of number ticks

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:761


position

position: Position

Where the axis appear on the chart

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:731


showDuplicatedTicks?

showDuplicatedTicks?: boolean

Show duplicated ticks

Default Value

false

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:766


showOverlappingLabels

showOverlappingLabels: boolean

Shows all labels, also the overlapping ones

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:729


showOverlappingTicks

showOverlappingTicks: boolean

shows all ticks and gridlines, including those belonging to labels that got culled due to overlapping with other labels

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:727


specType

specType: "axis"

The type of spec, can be series, axis, annotation, settings etc

Overrides

Spec.specType

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:713


style?

style?: RecursivePartial<Omit<AxisStyle, "gridLine">>

Custom style overrides

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:750


tickFormat?

tickFormat?: TickFormatter<any>

A function called to format every tick value label. Uses first series spec tickFormat when not provided.

used in tooltip when no tickFormat is provided from series spec

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:738


ticks?

ticks?: number

An approximate count of how many ticks will be generated

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:746


timeAxisLayerCount

timeAxisLayerCount: number

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.

Default Value

0

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:774


title?

title?: string

The axis title

Source

packages/charts/src/chart_types/xy_chart/utils/specs.ts:748


Generated using typedoc-plugin-markdown and TypeDoc