Skip to content

Drawing Ellipses

Draws ellipses with the given x and y radii.

INFO

For an easier way to draw circles, see the Circle component.

Props

NameDescriptionTypeDefault
radiusThe x and y radii of the ellipse.PossibleVector2[1,1]
positionThe position of the center of the ellipse.PossibleVector2[0,0]
colorThe stroke color of the ellipse.string#000
line-widthThe stroke line width of the ellipse.number1.5
fillThe fill color of the ellipse.stringnone
dashedWhether the ellipse should be drawn with a dashed stroke.booleanfalse
rotationThe rotation of the ellipse. In degrees unless radians is specified.number0
radiansWhether the rotation is specified in radians.booleanfalse

Examples

Basic Ellipse

Code
vue
<template>
  <Graph :units="false">
    <Ellipse :radius="[3, 2]" />
  </Graph>
</template>

Filled Ellipse

Code
vue
<template>
  <Graph :units="false">
    <Ellipse :radius="[3, 2]" fill="#33aabb33" color="#33aabb" />
  </Graph>
</template>

Rotated Ellipse

Code
vue
<template>
  <Graph :units="false">
    <Ellipse :radius="[3, 2]" :rotation="45" />
  </Graph>
</template>