Mark
The Mark class represents a primitive building block of a visualization. There are different types of marks, implemented as the child classes of Mark: Path, Text, and Image.
Properties
property | explanation | type | default value |
---|---|---|---|
id | the unique id of the mark | String | |
type | the type of the mark | String | |
dataScope | the data scope of the mark | DataScope | undefined |
opacity | the opacity of the mark (between 0 and 1) | Number | 1 |
visibility | whether the mark is visible (“visible” or “hidden”) | String | “visible” |
Methods
method | explanation | return type |
---|---|---|
contains(x, y) | whether this mark contains a point x (Number): x coordinate of the point y (Number): y coordinate of the point | Boolean |
getScene() | returns the scene in which this mark resides | Scene |
duplicate() | returns a copy of this mark | Mark |