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

class anychart.scales.DateTimeTicks Improve this Doc

Extends: anychart.Base

Scale ticks.

Methods Overview

Miscellaneous
count()Gets or sets ticks count value. If opt_value is defined but not a number or less than 2, it defaults to 5.
get()Returns an array of ticks. Each tick is a value in terms of data, to make a tick on.
interval()Gets or sets ticks interval value. Note, that interval value can be read only if it was set explicitly.
set()Setups ticks as an explicit array of fixed ticks.

Methods Description

count

Gets or sets ticks count value. If opt_value is defined but not a number or less than 2, it defaults to 5.

Params:

Name Type Description
value number Ticks interval value if used as a getter.

Returns:

number anychart.scales.DateTimeTicks - Interval value or itself for method chaining.

get

Returns an array of ticks. Each tick is a value in terms of data, to make a tick on.

Returns:

Array - Array of ticks.

interval

Gets or sets ticks interval value. Note, that interval value can be read only if it was set explicitly. It is returned as NaN otherwise. If opt_value is defined but is not a number or less than 0, it defaults to NaN and count() resets to 5.

Params:

Name Type Description
years number | string Years or string representing date part or ISO 8601 interval string.
months number Months or number of whatever date part specified by first parameter.
days number Days.
hours number Hours.
minutes number Minutes.
seconds number Seconds.

Returns:

string anychart.scales.DateTimeTicks - Interval value or itself for chaining.

set

Setups ticks as an explicit array of fixed ticks.

Params:

Name Type Description
ticks Array Explicit ticks array.

Returns:

anychart.scales.DateTimeTicks - Returns itself for method chaining.