Interface: CartesianScaleOptions

    alignToPixels: boolean

    Align pixel values to device pixels

    Inherited from

    .alignToPixels

    Defined in

    index.esm.d.ts:1116 (opens new window)


    axis

    axis: "x" | "y"

    Which type of axis this is. Possible values are: ‘x’, ‘y’. If not set, this is inferred from the first character of the ID which should be ‘x’ or ‘y’.

    Defined in


    bounds

    bounds: "ticks" | "data"

    Scale boundary strategy (bypassed by min/max time options)

    • data: make sure data are fully visible, ticks outside are removed
    • ticks: make sure ticks are fully visible, data outside are truncated

    since 2.7.0

    default ‘ticks’

    Defined in

    index.esm.d.ts:2899 (opens new window)


    display

    display: boolean | "auto"

    Controls the axis global visibility (visible when true, hidden when false). When display: ‘auto’, the axis is visible only if at least one associated dataset is visible.

    default true

    Inherited from

    .display

    Defined in

    index.esm.d.ts:1112CartesianScaleOptions - 图4 (opens new window)


    grid

    grid: GridLineOptions

    Defined in

    index.esm.d.ts:2938 (opens new window)


    max

    max: number

    User defined maximum value for the scale, overrides maximum value from data.

    Defined in


    min

    min: number

    User defined minimum value for the scale, overrides minimum value from data.

    Defined in

    index.esm.d.ts:2925 (opens new window)


    offset

    offset: boolean

    If true, extra space is added to the both edges and the axis is scaled to fit into the chart area. This is set to true for a bar chart by default.

    default false

    Defined in


    position

    position: "left" | "right" | "bottom" | "top" | "center" | { [scale: string]: number; }

    Position of the axis.

    Defined in

    index.esm.d.ts:2904 (opens new window)


    reverse

    reverse: boolean

    Reverse the scale.

    default false

    Inherited from

    .reverse

    Defined in

    index.esm.d.ts:1121CartesianScaleOptions - 图10 (opens new window)


    Optional stack: string

    Stack group. Axes at the same position with same stack are stacked.

    Defined in

    index.esm.d.ts:2909 (opens new window)


    stackWeight

    Optional stackWeight: number

    default 1

    Defined in


    stacked

    Optional stacked: boolean | "single"

    If true, data will be comprised between datasets of data

    default false

    Defined in

    index.esm.d.ts:2967 (opens new window)


    ticks

    ticks: TickOptions & { align: "start" | "end" | "center" ; autoSkip: boolean ; autoSkipPadding: number ; crossAlign: "center" | | "far" ; includeBounds: boolean ; labelOffset: number ; maxRotation: number ; minRotation: number ; mirror: boolean ; padding: number ; sampleSize: number }

    Defined in

    index.esm.d.ts:2969CartesianScaleOptions - 图14 (opens new window)


    title

    title: Object

    Options for the scale title.

    Type declaration

    Defined in

    index.esm.d.ts:2941 (opens new window)


    weight

    weight: number

    The weight used to sort the axis. Higher weights are further away from the chart area.

    default true

    Inherited from

    .weight

    Defined in

    index.esm.d.ts:1126CartesianScaleOptions - 图16 (opens new window)

    afterBuildTicks

    afterBuildTicks(axis): void

    Callback that runs after ticks are created. Useful for filtering ticks.

    Parameters

    NameType
    axis<CoreScaleOptions>

    Returns

    void

    Inherited from

    .afterBuildTicks

    Defined in

    index.esm.d.ts:1154 (opens new window)


    afterCalculateLabelRotation

    afterCalculateLabelRotation(axis): void

    Callback that runs after tick rotation is determined.

    Parameters

    NameType
    axis<CoreScaleOptions>

    Returns

    void

    Inherited from

    .afterCalculateLabelRotation

    Defined in

    index.esm.d.ts:1170CartesianScaleOptions - 图18 (opens new window)


    afterDataLimits

    afterDataLimits(): void

    Callback that runs after data limits are determined.

    Parameters

    NameType
    axis<CoreScaleOptions>

    Returns

    void

    Inherited from

    .afterDataLimits

    Defined in

    index.esm.d.ts:1146 (opens new window)


    afterFit

    afterFit(axis): void

    Callback that runs after the scale fits to the canvas.

    Parameters

    NameType
    axis<CoreScaleOptions>

    Returns

    void

    Inherited from

    .afterFit

    Defined in

    index.esm.d.ts:1178CartesianScaleOptions - 图20 (opens new window)


    afterSetDimensions(axis): void

    Callback that runs after dimensions are set.

    Parameters

    Returns

    void

    Inherited from

    CoreScaleOptions.

    Defined in


    afterTickToLabelConversion

    afterTickToLabelConversion(axis): void

    Parameters

    NameType
    axisScale<>

    Returns

    void

    Inherited from

    CoreScaleOptions.

    Defined in


    afterUpdate

    afterUpdate(axis): void

    Callback that runs at the end of the update process.

    Parameters

    NameType
    axisScale<>

    Returns

    void

    Inherited from

    CoreScaleOptions.

    Defined in


    beforeBuildTicks

    beforeBuildTicks(axis): void

    Callback that runs before ticks are created.

    Parameters

    NameType
    axisScale<>

    Returns

    void

    Inherited from

    CoreScaleOptions.

    Defined in


    beforeCalculateLabelRotation

    beforeCalculateLabelRotation(axis): void

    Callback that runs before tick rotation is determined.

    Parameters

    NameType
    axisScale<>

    Returns

    void

    Inherited from

    CoreScaleOptions.

    Defined in


    beforeDataLimits

    beforeDataLimits(axis): void

    Callback that runs before data limits are determined.

    Parameters

    Returns

    void

    Inherited from

    CoreScaleOptions.

    Defined in


    beforeFit

    beforeFit(axis): void

    Callback that runs before the scale fits to the canvas.

    Parameters

    NameType
    axisScale<>

    Returns

    void

    Inherited from

    CoreScaleOptions.

    Defined in


    beforeSetDimensions

    beforeSetDimensions(axis): void

    Callback that runs before dimensions are set.

    Parameters

    NameType
    axisScale<>

    Returns

    void

    Inherited from

    CoreScaleOptions.

    Defined in


    beforeTickToLabelConversion

    beforeTickToLabelConversion(axis): void

    Callback that runs before ticks are converted into strings.

    Parameters

    NameType
    axisScale<>

    Returns

    void

    Inherited from

    CoreScaleOptions.

    Defined in


    beforeUpdate

    beforeUpdate(axis): void

    Callback called before the update process starts.

    Parameters

    NameType
    Scale<>

    Returns

    void

    Inherited from

    CoreScaleOptions.

    Defined in