logo

G

  • Tutorials
  • API
  • Examples
  • Plugins
  • Productsantv logo arrow
  • 6.1.26
  • Canvas
    • Introduction
    • Options
    • Built-in objects
    • Coordinate system
    • Scenegraph & Lifecycle
    • Event
    • OffscreenCanvas & Server-side Rendering
    • CustomElementRegistry
    • Frequently Asked Questions
  • Renderer
    • Introduction
    • Canvas Renderer
    • Canvaskit Renderer
    • SVG Renderer
    • WebGL Renderer
    • WebGPU Renderer
    • Custom Renderer
  • Camera
    • Introduction
    • Camera Parameters
    • Camera action
    • Camera animation
  • Event
    • Introduction
    • Event Object
    • Gesture & Drag'n'Drop
    • Frequently Asked Questions
  • Animation
    • Web Animations API
    • Lottie
  • Basic Shapes
    • Basic Concepts
    • DisplayObject
    • Group
    • Text
    • Circle
    • Ellipse
    • Rect
    • Image
    • Line
    • Polygon
    • Polyline
    • Path
    • HTML
  • Style System
    • Introduction
    • CSS Typed OM
    • Inheritance
    • CSS Properties & Values API
    • CSS Layout API
    • Pattern
    • Gradient
  • 3D
    • 材质
    • 几何
    • Mesh
    • 光源
    • 雾
    • 交互
  • Built-in Objects
    • EventTarget
    • Node
    • Element
    • Document
    • MutationObserver
    • Utils
  • GPGPU
    • Introduction
    • Programming Model
    • Kernel API
    • Principles of classical GPGPU implementation
    • webgpu-graph
  • Declarative programming
    • 使用 Web Components
  • Devtools
    • G 开发者工具
    • 内置的渲染统计信息
    • 第三方开发调试工具

Circle

Previous
Text
Next
Ellipse

Resource

Ant Design
Galacea Effects
Umi-React Application Framework
Dumi-Component doc generator
ahooks-React Hooks Library

Community

Ant Financial Experience Tech
seeconfSEE Conf-Experience Tech Conference

Help

GitHub
StackOverflow

more productsMore Productions

Ant DesignAnt Design-Enterprise UI design language
yuqueYuque-Knowledge creation and Sharing tool
EggEgg-Enterprise-class Node development framework
kitchenKitchen-Sketch Tool set
GalaceanGalacean-Interactive solution
xtechLiven Experience technology
© Copyright 2025 Ant Group Co., Ltd..备案号:京ICP备15032932号-38

Loading...

You can refer to the <circle> element of SVG.

The following example draws a circle with a center of [100, 100] and a radius of 100.

const circle = new Circle({
style: {
cx: 100,
cy: 100,
r: 100,
},
});

Inherited from

Inherits style property from DisplayObject.

anchor

The default value is [0.5, 0.5]. For details, see DisplayObject's anchor.

transformOrigin

The default value is center. For details, see DisplayObject's transformOrigin.

Additional Properties

cx

The x-axis coordinates of the center of the circle in the local coordinate system.

https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/cx

Initial valueApplicable elementsInheritableAnimatableComputed value
'0'-noyes<percentage> <length>

cy

The y-axis coordinates of the center of the circle in the local coordinate system.

https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/cy

Initial valueApplicable elementsInheritableAnimatableComputed value
'0'-noyes<percentage> <length>

r

The radius of the circle.

https://developer.mozilla.org/zh-CN/docs/Web/SVG/Attribute/r

Initial valueApplicable elementsInheritableAnimatableComputed value
'0'-noyes<percentage> <length>