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

class anychart.graphics.vector.LinearGradient Improve this Doc

Linear gradient.
Used to fill shapes with linear gradient configured with (anychart.graphics.vector.GradientKey) array. Gradient line is a perpendicular to colors line. Gradient angle is an angle relative to horizontal line (0 degrees means horizontal). Gradient has its own opacity, but keys opacity has priority over it.
Do not invoke constructor directly. Use anychart.graphics.vector.Shape#fill to create linear gradient.
See also:
anychart.graphics.vector.Circle#fill anychart.graphics.vector.Ellipse#fill
Linear gradient has three modes: ObjectBoundingBox with angle value preservation, ObjectBoundingBox without angle value preservation and UserSpaceOnUse. Learn more about gradient modes.

Methods Overview

Miscellaneous
dispose()Disposes gradient completely, removes from parent layer, null internal links, removes from DOM structure.

Methods Description

dispose

Disposes gradient completely, removes from parent layer, null internal links, removes from DOM structure.