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#
| property | explanation | type | default value |
|---|
x  | the x coordinate of the center of the circle | Number | 0 |
y  | the y coordinate of the center of the circle | Number | 0 |
| radius | the radius of the circle | Number | 100 |
area  | the area of the circle | Number | |
Properties inherited from Mark#
| property | explanation | type | default value |
|---|
id  | the unique id of the mark | String | |
type  | the type of the mark | String | “circle” |
bounds  | the bounding rectangle of the mark | Rectangle | |
| dataScope | the data scope of the mark | DataScope | undefined |
| fillColor | the fill color of the mark | Color | “none” |
| strokeColor | the stroke color of the mark | Color | “#ccc” |
| strokeDash | the dashes and gaps for the mark stroke | String | “none” |
| strokeWidth | the stroke width of the mark in pixels | Number | 1 |
| 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 |
|---|
| getSVGPathData() | returns a string to be used as the d parameter in an SVG path element | String |