Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TickOptions

Hierarchy

  • TickOptions

Index

Properties

Optional align

align?: "center" | "start" | "end"

The label alignment

default

'center'

Optional autoSkip

autoSkip?: boolean

If true, automatically calculates how many labels can be shown and hides labels accordingly. Labels will be rotated up to maxRotation before skipping any. Turn autoSkip off to show all labels no matter what.

default

true

Optional autoSkipPadding

autoSkipPadding?: number

Padding between the ticks on the horizontal axis when autoSkip is enabled.

default

0

Optional backdropColor

backdropColor?: Scriptable<CHARTJS.Color>

Color of label backdrops.

default

'rgba(255, 255, 255, 0.75)'

Optional backdropPadding

backdropPadding?: number | ChartArea

Padding of tick backdrop.

default

2

Optional callback

callback?: ScriptableFunction<string | number | string[] | number[]>

Returns the string representation of the tick value as it should be displayed on the chart. See callback.

Optional color

Color of tick

see

Defaults.color

Optional crossAlign

crossAlign?: "center" | "near" | "far"

How is the label positioned perpendicular to the axis direction. This only applies when the rotation is 0 and the axis position is one of "top", "left", "right", or "bottom"

default

'near'

Optional display

display?: boolean

If true, show tick labels.

default

true

Optional font

see Fonts

Optional includeBounds

includeBounds?: boolean

Should the defined min and max values be presented as ticks even if they are not "nice".

default?:

true

Optional labelOffset

labelOffset?: number

Distance in pixels to offset the label from the centre point of the tick (in the x direction for the x axis, and the y direction for the y axis). Note?: this can cause labels at the edges to be cropped by the edge of the canvas

default

0

Optional major

major?: { enabled?: boolean }

Type declaration

  • Optional enabled?: boolean

    If true, major ticks are generated. A major tick will affect autoskipping and major will be defined on ticks in the scriptable options context.

    default

    false

Optional maxRotation

maxRotation?: number

Maximum rotation for tick labels when rotating to condense labels. Note?: Rotation doesn't occur until necessary. Note?: Only applicable to horizontal scales.

default

50

Optional minRotation

minRotation?: number

Minimum rotation for tick labels. Note?: Only applicable to horizontal scales.

default

0

Optional mirror

mirror?: boolean

Flips tick labels around axis, displaying the labels inside the chart instead of outside. Note?: Only applicable to vertical scales.

default

false

Optional padding

padding?: number

Sets the offset of the tick labels from the axis

Optional sampleSize

sampleSize?: number

The number of ticks to examine when deciding how many labels will fit. Setting a smaller value will be faster, but may be less accurate when there is large variability in label length.

default

ticks.length

Optional showLabelBackdrop

showLabelBackdrop?: Scriptable<boolean>

If true, draw a background behind the tick labels.

default

false

Optional textStrokeColor

textStrokeColor?: Scriptable<CHARTJS.Color>

The color of the stroke around the text.

default

undefined

Optional textStrokeWidth

textStrokeWidth?: Scriptable<number>

Stroke width around the text.

default

0

Optional z

z?: number

z-index of tick layer. Useful when ticks are drawn on chart area. Values <= 0 are drawn under datasets, > 0 on top.

default

0

Generated using TypeDoc