Circle

extends Mark

The Circle class represents a circle mark. To create a circle, use the mark method in the Scene class, for example:

    let circle = scene.mark("circle", {x: 50, y: 100, radius: 20});

Properties

propertyexplanationtypedefault value
x the x coordinate of the center of the circleNumber0
y the y coordinate of the center of the circleNumber0
radiusthe radius of the circleNumber100
area the area of the circleNumber

Properties inherited from Mark

propertyexplanationtypedefault value
id the unique id of the markString
type the type of the markString“circle”
bounds the bounding rectangle of the markRectangle
dataScopethe data scope of the markDataScopeundefined
fillColorthe fill color of the markColor“none”
strokeColorthe stroke color of the markColor“#ccc”
strokeDashthe dashes and gaps for the mark strokeString“none”
strokeWidththe stroke width of the mark in pixelsNumber1
opacitythe opacity of the mark (between 0 and 1)Number1
visibilitywhether the mark is visible (“visible” or “hidden”)String“visible”

Methods

methodexplanationreturn type
getSVGPathData()returns a string to be used as the d parameter in an SVG path elementString