Glyph
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
property | explanation | type | default value |
---|---|---|---|
id | the unique id of the group | String | |
type | the type of the group | String | “glyph” |
dataScope | the data scope of the group | DataScope | undefined |
layout | the layout of the group children | Layout | undefined |
children | the graphical objects in the group | Array | [] |
firstChild | the first child in the group | Mark | |
lastChild | the last child in the group | Mark or Group | |
bounds | the bounding rectangle of the group | Rectangle | |
center | the center of the group bounds | Point | |
x | the x coordinate of the center of the group bounds | Number | |
y | the y coordinate of the center of the group bounds | Number | |
visibility | whether the group is visible (“visible” or “hidden”) | String | “visible” |
Methods inherited from Group
method | explanation | return type |
---|---|---|
addChild(c) | adds an object to the group | void |
addChildAt(c, i) | adds an object to the group at the specified index | void |
contains(x, y) | whether this group contains a point x (Number): x coordinate of the point y (Number): y coordinate of the point | Boolean |
removeChild(c) | removes the specified object from the group | void |
removeAll() | removes all the children from the group | void |
getScene() | returns the scene in which this group resides | Scene |
sortChildren (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. | void |