AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.palettes.RangeColors Improve this Doc

Extends: anychart.core.Base

Gradient palette class.

Methods Overview

Specific settings
count()Colors counts.
itemAt()Color by index.
items()Colors list.

Methods Description

count

Getter for color palette colors counts.

Returns:

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

Params:

NameTypeDefaultDescription
countnumber
NaN
Color palette colors counts.

Returns:

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

itemAt

Getter for color palette colors from list by index.

Params:

NameTypeDescription
indexnumberIndex to get color.

Returns:

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

Params:

NameTypeDescription
indexnumberIndex to set color.
coloranychart.graphics.vector.SolidFillColor to set by passed index.

Returns:

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

items

Getter for color palette colors list.

Returns:

Array.<anychart.graphics.vector.SolidFill> - Color palette colors list.
Setter for color palette colors list.

Params:

NameTypeDescription
colorArray.<(anychart.graphics.vector.SolidFill|Object)> | anychart.graphics.vector.LinearGradientFill | anychart.graphics.vector.RadialGradientFill | Array.<anychart.graphics.vector.GradientKey> | Array.<string> | anychart.graphics.vector.SolidFill | stringColor palette colors list to set.
var_argsanychart.graphics.vector.SolidFill | stringAnother colors.

Returns:

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