Subclasses: Path, Text, Image

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.


propertyexplanationtypedefault value
id the unique id of the markString
type the type of the markString
dataScopethe data scope of the markDataScopeundefined
opacitythe opacity of the mark (between 0 and 1)Number1
visibilitywhether the mark is visible (“visible” or “hidden”)String“visible”


methodexplanationreturn type
contains(x, y)whether this mark contains a point
x (Number): x coordinate of the point
y (Number): y coordinate of the point
getScene()returns the scene in which this mark residesScene
duplicate()returns a copy of this markMark