Top
You are looking at an outdated 7.5.1 version of this document. Switch to the 8.0.1 version to see the up to date information.

class anychart.scales.Linear Improve this Doc

Extends: anychart.scales.ScatterBase

Represents simple linear scale that transforms values from domain [a, b] to domain [0, 1]. Note that a can be greater than b. The only condition for the scale is that a != b.
Note: To create instance use method anychart.scales#linear.

Methods Overview

Miscellaneous
minorTicks()Getter for set of scale minor ticks in terms of data values.
stickToZero()Getter for stick to zero.
ticks()Getter for set of scale ticks in terms of data values.

Methods Description

minorTicks

Getter for set of scale minor ticks in terms of data values.

Returns:

anychart.scales.ScatterTicks - Current ticks.
Setter for set of scale minor ticks in terms of data values.

Params:

Name Type Description
value Object | Array An array of ticks to set.

Returns:

anychart.scales.Linear - Self instance for method chaining.

Try it:

stickToZero

Getter for stick to zero.

Returns:

boolean - Current state stick to zero.

Try it:

Setter for stick to zero. Flag to stick to zero value on auto calc if gaps lead to zero crossing.

Params:

Name Type Default Description
value boolean
true
Value to set.

Returns:

anychart.scales.Linear - Self instance for method chaining.

Try it:

ticks

Getter for set of scale ticks in terms of data values.

Returns:

anychart.scales.ScatterTicks - Current ticks.
Setter for set of scale ticks in terms of data values.

Params:

Name Type Description
value Object | Array An array of ticks to set.

Returns:

anychart.scales.Linear - Self instance for method chaining.

Try it: