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

class anychart.scales.DateTime Improve this Doc

Extends: anychart.scales.ScatterBase

Define Datetime scale.
Note: To create instance use method anychart.scales.dateTime.

Methods Overview

Miscellaneous
extendDataRange()Extends the current input domain with the passed values (if such don't exist in the domain).
minorTicks()Getter for set of scale ticks in terms of data values.
ticks()Getter for set of scale ticks in terms of data values.
transform()Returns tick position ratio by its name.

Methods Description

extendDataRange

Extends the current input domain with the passed values (if such don't exist in the domain).
Note: Attention! anychart.scales.Base#finishAutoCalc drops all passed values.

Params:

Name Type Description
var_args * Values that are supposed to extend the input domain.

Returns:

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

minorTicks

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

Returns:

anychart.scales.DateTimeTicks - An instance of class for method chaining.
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.DateTime - Self instance for method chaining.

Try it:

ticks

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

Returns:

anychart.scales.DateTimeTicks - An instance of class for method chaining.
Setter for set of scale ticks in terms of data values.

Params:

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

Returns:

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

Try it:

transform

Returns tick position ratio by its name.
Note: returns correct values only after anychart.scales.Base#finishAutoCalc or chart.draw().

Params:

Name Type Description
value * Value to transform in input scope.

Returns:

number - Value transformed to scope [0, 1].

Try it: