Top
You are looking at an outdated 7.7.0 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

Specific settings
maximumGap()Maximum gap settings.
minimumGap()Minimum gap settings.
minorTicks()Minor ticks settings.
softMaximum()Soft maximum settings.
softMinimum()Soft minimum settings.
stickToZero()Stick to zero.
ticks()Ticks settings.

Methods Description

maximumGap

Getter for the current scale maximum gap.

Returns:

number - The current scale maximum gap.

Try it:

Setter for the scale maximum gap.

Params:

Name Type Default Description
value number
0.1
Value from 0 to 1.

Returns:

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

Try it:

minimumGap

Getter for the current scale minimum gap.

Returns:

number - The current scale minimum gap.

Try it:

Setter for the scale minimum gap.

Params:

Name Type Default Description
value number
0.1
Value from 0 to 1.

Returns:

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

Try it:

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:

softMaximum

Getter for the current soft maximum.

Returns:

number - Current soft maximum.

Try it:

Setter for soft maximum.

Params:

Name Type Default Description
value number
null
Value to set

Returns:

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

Try it:

softMinimum

Getter for the current soft minimum.

Returns:

number - Current soft minimum.

Try it:

Setter for soft minimum.

Params:

Name Type Default Description
value number
null
Value 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: