RectPattern
Type class
Rectangular pattern
Sources
RectPattern can be used (imported) via one of the following packages.
/** * Import from: "core.ts" * Use like: am4core.RectPattern */import * as am4core from "@amcharts/amcharts4/core";/** * Include via: <script src="core.js"></script> * Access items like: am4core.RectPattern */Inheritance
RectPattern extends Pattern.
RectPattern is not extended by any other symbol.
Properties
rectHeightType
numberRectangle height in pixels.
rectWidthType
numberRectangle width in pixels.
21 inherited items
backgroundFillType
ColorInherited fromPatternPattern background fill color.
backgroundOpacityType
numberInherited fromPatternPattern backgorund opacity. (0-1)
clonedFromType
$type.Optional<this>Inherited fromBaseObjectReference to the original object this object was cloned from. We need to keep this so we can disassociate it from source object when this object is disposed.
configType
objectInherited fromBaseObjectUse this property to set JSON-based config. When set, triggers processing routine, which will go through all properties, and try to apply values, create instances, etc.
Use this with caution, as it is a time-consuming process. It's used for initialchart setup only, not routine operations.
elementType
GroupInherited fromPatternAn SVG
<group>element to put sub-elements into.elementsType
List<AMElement>Inherited fromPatternReturns the list of SVG elements comprising the pattern.
fillType
ColorInherited fromPatternFill color of the pattern.
fillOpacityType
numberInherited fromPatternPattern fill opacity. (0-1)
heightType
numberInherited fromPatternPattern height in pixels.
idType
$type.Optional<string>Inherited fromBaseObjectSets the user-defined id of the element.
patternUnitsType
"userSpaceOnUse"|"objectBoundingBox"Inherited fromPatternPattern measuring units.
Available options: "userSpaceOnUse" | "objectBoundingBox".
rotationType
numberInherited fromPatternPattern rotation in degrees.
shapeRenderingType
ShapeRenderingInherited fromPatternShape rendering
strokeType
ColorInherited fromPatternPattern stroke (border) color.
strokeDasharrayType
stringInherited fromPatternA
stroke-dasharrayfor the stroke (outline)."Dasharray" allows setting rules to make lines dashed, dotted, etc.
More info: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray on
stroke-dasharraystrokeOpacityType
numberInherited fromPatternPattern stroke opacity. (0-1)
strokeWidthType
numberInherited fromPatternPattern stroke thickness in pixels.
uidType
stringInherited fromBaseObjectReturns object's internal unique ID.
widthType
numberInherited fromPatternPattern width in pixels.
xType
numberInherited fromPatternX position. (pixels)
yType
numberInherited fromPatternY position (px).
Methods
constructor()Returns
RectPatternConstructor
8 inherited items
addElement(element:AMElement)Returns
voidInherited fromPatternAdds an element to the pattern.
animate(animationOptions:IAnimationOptions[]|IAnimationOptions,
duration:number,
easing?: (value:number) =>number)Returns
AnimationInherited fromPatternAnimate pattern properties.
More info:
Animationclone(cloneId?:string)Returns
thisInherited fromBaseObjectMakes a copy of this object and returns the clone. Try to avoid cloning complex objects like chart, create new instances if you need them.
copyFrom(source:this)Returns
voidInherited fromPatternCopies properties from another Pattern instance.
dispose()Returns
voidInherited fromBaseObjectDestroys this object and all related data.
getCurrentThemes()Returns
ITheme[]Inherited fromBaseObjectReturns a list of themes that should be applied to this element. It could either be a list of themes set explicitly on this element, or system-wide.
isDisposed()Returns
booleanInherited fromBaseObjectReturns if this object has been already been disposed.
removeElement(element:AMElement)Returns
voidInherited fromPatternRemove an element from the pattern.
Events
RectPattern does not have any events.