Skip to content
This component has been updated! New ending shapes added

o-arc web component

<o-arc> is a standard and vanilla web-component for rendering a radial arcs or pies. The JavaScript runtime supports more than 60 arcs per orbit. Omit value for equal segments; an explicit value="0" produces an empty segment.

To change o-arc colors use CSS custom var --o-fill for background, --o-stroke for border, and --o-stroke-width for border-width in a o-arc style.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

o-arc has one special attribute: shape to define different endings. You can choose between circle (or circle-a), circle-b, arrow, bullet, rounded, slash, backslash, zizag shapes. Default none.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

Each o-arc has one orbit space size, but it can be finely adjusted using the CSS class utility .shrink-10 to .shrink-90, allowing the vectors to shrink by a specified percentage.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

On opposite way, the CSS class utility .grow-0x to .grow-12x, allowing vector to expand by a multiple of .orbit size. It is possible to use decimal fractions. For example, .grow-0.1x, .grow-10.7x, etc.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

.gap-*: Set a gap space between o-arcs ranging from 0 to 30,

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

.angle-*: Set starting point angle from 0 to 360 degrees, overrriding automatic radial arragement.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

By default, o-arc is positioned in the middle of orbit path. To change that, there some CSS utilities:

.inner-orbit: To place ano-arc just below its orbit.

.outer-orbit: To place o-arc just above its orbit.

.quarter-inner-orbit: To place o-arc a 25% into its orbit.

.quarter-outer-orbit: To place o-arc a 25% outer its orbit.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

Font colors, size and other font properties

Section titled “Font colors, size and other font properties”

To change o-arc any CSS font properties just added in a o-arc style or class.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

To change o-arc background color use CSS custom var --o-fill in a o-arc style.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

o-arc has one special attribute: text-anchor to arrange its content. You can choose between start, middle, and end values.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

o-arc allows upside down its content to using flip attribute. Useful to make text more legible.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

o-arc allows distribute its content to fill text-length using fit-range attribute.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

To create pie / sunburst or donut charts simple use attribute value from 0 to 100 in o-arc.

Examples include the current Orbit stylesheet and runtime. Get both files for your project.

<o-arc> is decorative by default so it does not intercept nearby controls. Add interactive to enable pointer events on its painted SVG:

<o-arc interactive value="72"></o-arc>

Use an accessible button or provide keyboard behavior and an accessible name when the element acts as a control.