Skip to content

Drawing Arcs ​

Draws a circular arc with a given radius, position, and angle.

α

INFO

The arc is always drawn counter-clockwise from the from angle to the to angle.

TIP

For an easier way to draw angles between lines or vectors, see the Angle component.

To draw a circular sector, see the Sector component.

Props ​

NameTypeDefaultDescription
fromnumber0The starting angle of the arc. Defaults to degrees unless radians is set.
tonumber0The ending angle of the arc. Defaults to degrees unless radians is set.
positionPossibleVector2[0,0]The position of the center of the arc.
radiusnumber3The radius of the arc.
line-widthnumber1.25The width of the arc.
colorstring#000The stroke color of the arc.
dashedbooleanfalseWhether the arc should be dashed.
radiansbooleanfalseWhether to and from are provided in radians.
labelstring|undefinedundefinedThe label of the arc. If provided, will be drawn at the arc's halfway point.
label-size"small"|"normal"|"large"smallThe size of the label.

Examples ​

Simple Arc ​

Code
vue
<template>
  <Graph :units="false">
    <Arc :from="0" :to="180" :radius="2" />
  </Graph>
</template>

Arc with Position ​

Code
vue
<template>
  <Graph :units="false">
    <Arc :position="[2, 0]" :from="180" :to="0" :radius="1" color="red" />
  </Graph>
</template>

Arc with Dashed Stroke ​

Code
vue
<template>
  <Graph :units="false">
    <Arc :from="0" :to="270" :radius="2" :line-width="1.75" dashed />
  </Graph>
</template>

Arc with Label ​

α
Code
vue
<template>
  <Graph :units="false">
    <Arc :from="0" :to="65" :radius="2" :line-width="1.75" label="α" />
  </Graph>
</template>