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

class anychart.palettes.RangeColors Improve this Doc

Extends: anychart.core.Base

Gradient palette.

Methods Overview

Miscellaneous
colorAt()Getter for color palette colors from list by index.
colors()Getter for the color palette colors list.
count()Getter for color palette colors counts.

Methods Description

colorAt

Getter for color palette colors from list by index.

Params:

Name Type Description
index number Index to get color.

Returns:

anychart.graphics.vector.SolidFill anychart.palettes.RangeColors - Color palette colors by index.
Setter for color palette colors from list by index.

Params:

Name Type Description
index number Index to set color.
color anychart.graphics.vector.SolidFill Color to set by passed index.

Returns:

anychart.palettes.RangeColors - Self instance for method chaining.

Try it:

colors

Getter for the color palette colors list.
Setter for color palette colors list.

Params:

Name Type Description
value Array.<anychart.graphics.vector.SolidFill> | anychart.graphics.vector.LinearGradient | anychart.graphics.vector.RadialGradient | Array.<anychart.graphics.vector.GradientKey> | Array.<string> Color palette colors list to set.

Returns:

anychart.palettes.RangeColors - Self instance for method chaining.

Try it:

count

Getter for color palette colors counts.

Returns:

number - Current color palette colors count.
Setter for color palette's colors counts.
Note: Defines how many steps we need in gradient.

Params:

Name Type Default Description
value number
NaN
Color palette colors counts.

Returns:

anychart.palettes.RangeColors - Self instance for method chaining.

Try it: