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

namespace anychart.graphics.vector Improve this Doc

A namespace for working with vector graphics.

Functions Overview

normalizeFill()Normalizes stroke params. Look at anychart.graphics.vector.Shape#fill params for details.
normalizeHatchFill()Normalize hatch fill.
normalizeStroke()Normalizes stroke params. Look at anychart.graphics.vector.Shape#stroke params for details.

Classes Overview

anychart.graphics.vector.CircleCircle Class. Inherited from Ellipse.
anychart.graphics.vector.ClipClass representing independent clip, that can be applied to any element.
anychart.graphics.vector.ElementAbstract class for all vector elements, such as groups and primitives.
anychart.graphics.vector.EllipseEllipse Class.
anychart.graphics.vector.HatchFillHatchFill is a special pattern fill with predefined set of a primitives. Sets of a primitives does numbered and
anychart.graphics.vector.ImageImage primitive.
anychart.graphics.vector.LayerLayer class. Used to group elements.
anychart.graphics.vector.LinearGradientLinear gradient.
anychart.graphics.vector.PathPath class.
anychart.graphics.vector.PatternFillPattern fill class.
anychart.graphics.vector.RadialGradientRadial gradient.
anychart.graphics.vector.RectRectangle class
anychart.graphics.vector.ShapeBase class for all vector elements.
anychart.graphics.vector.StageThis class provide tools for cross-browser display with the single interface for both (SVG and VML).
anychart.graphics.vector.TextText class.
anychart.graphics.vector.UnmanagedLayer

Functions Description

normalizeFill

Normalizes stroke params. Look at anychart.graphics.vector.Shape#fill params for details.

Params:

NameTypeDescription
fillOrColorOrKeysanychart.graphics.vector.Fill | !Array.<(anychart.graphics.vector.GradientKey|string)> | nullFill settings or Color or Gradient keys.
opacityOrAngleOrCxnumberOpacity or Angle or x-coord of center.
modeOrCynumber | boolean | anychart.graphics.math.Rect | ObjectMode settings or y-coord of center.
opacityOrModenumber | anychart.graphics.math.Rect | Object | nullOpacity settings or Mode settings.
opacitynumberOpacity settings.
fxnumberFocal x-coord settings.
fynumberFocal y-coord settings.

normalizeHatchFill

Normalize hatch fill.

Params:

NameTypeDescription
patternFillOrTypeanychart.graphics.vector.HatchFill | anychart.graphics.vector.PatternFill | anychart.graphics.vector.HatchFill.HatchFillType | string | Object | nullPattern fill or type of the hatch fill.
colorstringColor.
thicknessstring | numberLine thickness. Defaults to 1.
sizestring | numberSize.

normalizeStroke

Normalizes stroke params. Look at anychart.graphics.vector.Shape#stroke params for details.

Params:

NameTypeDescription
strokeOrFillanychart.graphics.vector.Stroke | anychart.graphics.vector.ColoredFill | string | nullStroke fill, if used as setter.
thicknessnumberLine thickness. Defaults to 1.
dashpatternstringControls the pattern of dashes and gaps used to stroke paths. Dash array contains a list of comma and/or white space separated lengths and percentages that specify the lengths of alternating dashes and gaps. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. Thus, stroke dashpattern: 5,3,2 is equivalent to dashpattern: 5,3,2,5,3,2.
lineJoinanychart.graphics.vector.StrokeLineJoinLine join style.
lineCapanychart.graphics.vector.StrokeLineCapLine cap style.