Skip to content

Drawing Circular Sectors

Draws circular sectors with the given radius, start angle, and end angle.

-5-4-3-2-1012345543210-1-2-3-4-5

Props

NameDescriptionTypeDefault
radiusThe radius of the circle.number1
positionThe position of the center of the circle.PossibleVector2[0,0]
fromThe start angle of the sector. In degrees unless radians is set.number0
toThe end angle of the sector. In degrees unless radians is set.numbernone
colorThe stroke color of the sector.string#000
line-widthThe stroke line width of the sector.number1.5
fillThe fill color of the sector.stringnone
dashedWhether the sector should be drawn with a dashed stroke.booleanfalse
radiansWhether the from and to angles are in radians.booleanfalse

Examples

Basic Sector

Code
vue
<template>
  <Graph :units="false">
    <Sector :radius="3" :from="45" :to="135" />
  </Graph>
</template>

Filled Sector

Code
vue
<template>
  <Graph :units="false">
    <Sector :radius="3" :from="45" :to="135" fill="#33aabb33" color="#33aabb" />
  </Graph>
</template>