Class: Gradient

Gradient

Colors and direction to fill areas with gradients

Constructor

new Gradient(chart)

Parameters:
Name Type Description
chart Tee.Chart The parent chart this gradient object belongs to.
Properties:
Name Type Attributes Default Description
visible Boolean <optional>
false Determines if contents will be filled using this gradient.
colors Array.<Color> Array of colors to define the gradient.
direction String <optional>
"topbottom" Defines the gradient orientation ("topbottom", "bottomtop", "leftright", "rightleft", "radial", "diagonalup", "diagonaldown").
stops Array.<Number> Array of percentages from 0 to 1, for each color in colors array.
offset Point For radial gradients, moves the center xy position.
Source:

Methods

create() → {CanvasGradient}

Source:
Returns:
Returns a canvas gradient
Type
CanvasGradient

rect() → {CanvasGradient}

Source:
Returns:
Returns a canvas gradient
Type
CanvasGradient