AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated 7.1.0 version of this document. Switch to the 8.3.0 version to see the up to date information.

class anychart.scales.Ordinal Improve this Doc

Extends: anychart.scales.Base

Ordinal scale.

Methods Overview

Miscellaneous
extendDataRange()
inverseTransform()
names()Getter/setter for scale names.
ticks()Gets or sets a set of scale ticks in terms of data values.
transform()
values()

Methods Description

extendDataRange

Params:

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

Returns:

anychart.scales.Ordinal - Itself for chaining.

inverseTransform

Params:

Name Type Description
ratio number Value to transform in input scope.

Returns:

* - Value transformed to output scope.

names

Getter/setter for scale names.

Params:

Name Type Description
value Array.<*> | string Array of names or attribute name for data set.

Returns:

Array.<*> anychart.scales.Ordinal - Scale names or self for chaining.

ticks

Gets or sets a set of scale ticks in terms of data values.

Params:

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

Returns:

anychart.scales.Ordinal anychart.scales.OrdinalTicks - Ticks or itself for chaining.

transform

Params:

Name Type Description
value * Value to transform in input scope.
subRangeRatio number Sub range ratio.

Returns:

number - Value transformed to output scope.

values

Params:

Name Type Description
values Array.<*> | * | null Array of values, or values, or null for autocalc.
var_args * Other values, that should be contained in input domain.

Returns:

anychart.scales.Ordinal Array.<(number|string)> - This or input domain.