extends Group

The Glyph class represents a group of primitive marks. To create a glyph object, use the glyph method in the Scene class.

Properties inherited from Group

propertyexplanationtypedefault value
id the unique id of the groupString
type the type of the groupString“glyph”
dataScopethe data scope of the groupDataScopeundefined
layoutthe layout of the group childrenLayoutundefined
children the graphical objects in the groupArray[]
firstChild the first child in the groupMark
lastChild the last child in the groupMark or Group
bounds the bounding rectangle of the groupRectangle
center the center of the group boundsPoint
x the x coordinate of the center of the group boundsNumber
y the y coordinate of the center of the group boundsNumber
visibilitywhether the group is visible (“visible” or “hidden”)String“visible”

Methods inherited from Group

methodexplanationreturn type
addChild(c)adds an object to the groupvoid
addChildAt(c, i)adds an object to the group at the specified indexvoid
contains(x, y)whether this group contains a point
x (Number): x coordinate of the point
y (Number): y coordinate of the point
removeChild(c)removes the specified object from the groupvoid
removeAll()removes all the children from the groupvoid
getScene()returns the scene in which this group residesScene
(channel, reverse)
sort the children by a visual channel
channel (String): the channel to sort the children by
reverse: (Boolean, optional) setting to true will sort in descending order;
default is false.