- Prop
value- Type
number- Default
- —
- Requirement
- required
StatRing
React example follows below.
Vue example follows below.
Angular example follows below.
Svelte example follows below.
Solid example follows below.
- surface
- —
- marks
- —
- size
- —
- value
- —
ts
import { StatRing } from "@grassroot/charts-react"; export default function StatRingDemo() { return ( <div> <StatRing animation={{ durationMs: 560 }} value={99.97} label="Checkout API" sub="30-day availability" display="99.97%" color="var(--vs-success)" ariaLabel="Checkout API availability was 99.97 percent over the last 30 days" /> </div> );}- surface
- —
- marks
- —
- size
- —
- value
- —
ts
<script setup lang="ts">import { StatRing } from "@grassroot/charts-vue";</script> <template> <div> <StatRing :animation="{ durationMs: 560 }" :value="99.97" label="Checkout API" sub="30-day availability" display="99.97%" color="var(--vs-success)" aria-label="Checkout API availability was 99.97 percent over the last 30 days" /> </div></template>- surface
- —
- marks
- —
- size
- —
- value
- —
ts
import { ChangeDetectionStrategy, Component } from "@angular/core";import { GrassrootStatRing } from "@grassroot/charts-angular"; @Component({ selector: "app-stat-ring-chart-demo", standalone: true, imports: [GrassrootStatRing], changeDetection: ChangeDetectionStrategy.OnPush, template: `<grassroot-stat-ring [animation]="{ durationMs: 560 }" [value]="99.97" label="Checkout API" sub="30-day availability" display="99.97%" color="var(--vs-success)" ariaLabel="Checkout API availability was 99.97 percent over the last 30 days" />`,})export class StatRingDemoComponent {} export default StatRingDemoComponent;- surface
- —
- marks
- —
- size
- —
- value
- —
ts
<script lang="ts"> import { StatRing } from "@grassroot/charts-svelte";</script> <div> <StatRing animation={{ durationMs: 560 }} value={99.97} label="Checkout API" sub="30-day availability" display="99.97%" color="var(--vs-success)" ariaLabel="Checkout API availability was 99.97 percent over the last 30 days" /></div>- surface
- —
- marks
- —
- size
- —
- value
- —
ts
/** @jsxImportSource solid-js */import { StatRing } from "@grassroot/charts-solid"; export default function StatRingDemo() { return ( <div> <StatRing animation={{ durationMs: 560 }} value={99.97} label="Checkout API" sub="30-day availability" display="99.97%" color="var(--vs-success)" ariaLabel="Checkout API availability was 99.97 percent over the last 30 days" /> </div> );}Installation
API Reference
Import
import { StatRing } from "@grassroot/charts-react";
Props
Prop
Type
Default
Requirement
valuenumber—
required
labelstring—
required
substring | undefined—
optional
displaystring | undefined—
optional
colorstring | undefined—
optional
rendererChartRenderer | undefined—
optional
classNamestring | undefined—
optional
themeimport("@grassroot/theme").PartialChartTheme | undefined—
optional
animationimport("@grassroot/theme").ChartAnimationInput | undefined—
optional
titlestring | undefined—
optional
descriptionstring | undefined—
optional
ariaLabelstring | undefined—
optional
- Prop
label- Type
string- Default
- —
- Requirement
- required
- Prop
sub- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
display- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
color- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
renderer- Type
ChartRenderer | undefined- Default
- —
- Requirement
- optional
- Prop
className- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
theme- Type
import("@grassroot/theme").PartialChartTheme | undefined- Default
- —
- Requirement
- optional
- Prop
animation- Type
import("@grassroot/theme").ChartAnimationInput | undefined- Default
- —
- Requirement
- optional
- Prop
title- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
description- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
ariaLabel- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
keyboardNavigation- Type
boolean | undefined- Default
- —
- Requirement
- optional
Content regions
dataSummary
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.
Import
import { StatRing } from "@grassroot/charts-vue";
Props
Prop
Type
Default
Requirement
valuenumber—
required
maxnumber | undefined—
optional
labelstring—
required
substring | undefined—
optional
displaystring | undefined—
optional
colorstring | undefined—
optional
ariaLabelstring | undefined—
optional
rendererChartRenderer | undefined—
optional
themePartialChartTheme | undefined—
optional
animationChartAnimationInput | undefined—
optional
titlestring | undefined—
optional
descriptionstring | undefined—
optional
classNamestring | undefined—
optional
- Prop
value- Type
number- Default
- —
- Requirement
- required
- Prop
max- Type
number | undefined- Default
- —
- Requirement
- optional
- Prop
label- Type
string- Default
- —
- Requirement
- required
- Prop
sub- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
display- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
color- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
ariaLabel- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
renderer- Type
ChartRenderer | undefined- Default
- —
- Requirement
- optional
- Prop
theme- Type
PartialChartTheme | undefined- Default
- —
- Requirement
- optional
- Prop
animation- Type
ChartAnimationInput | undefined- Default
- —
- Requirement
- optional
- Prop
title- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
description- Type
string | undefined- Default
- —
- Requirement
- optional
- Prop
keyboardNavigation- Type
boolean | undefined- Default
- —
- Requirement
- optional
- Prop
className- Type
string | undefined- Default
- —
- Requirement
- optional
Content regions
dataSummary
Import
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { GrassrootStatRing } from "@grassroot/charts-angular";
Props
Prop
Type
Default
Requirement
valuenumber—
required
maxnumber100optional
labelstring—
required
substring—
optional
displaystring—
optional
colorstring—
optional
ariaLabelstring—
optional
rendererChartRenderer—
optional
themePartialChartTheme—
optional
animationChartAnimationInput—
optional
titlestring—
optional
descriptionstring—
optional
classNamestring—
optional
- Prop
value- Type
number- Default
- —
- Requirement
- required
- Prop
max- Type
number- Default
100- Requirement
- optional
- Prop
label- Type
string- Default
- —
- Requirement
- required
- Prop
sub- Type
string- Default
- —
- Requirement
- optional
- Prop
display- Type
string- Default
- —
- Requirement
- optional
- Prop
color- Type
string- Default
- —
- Requirement
- optional
- Prop
ariaLabel- Type
string- Default
- —
- Requirement
- optional
- Prop
renderer- Type
ChartRenderer- Default
- —
- Requirement
- optional
- Prop
theme- Type
PartialChartTheme- Default
- —
- Requirement
- optional
- Prop
animation- Type
ChartAnimationInput- Default
- —
- Requirement
- optional
- Prop
title- Type
string- Default
- —
- Requirement
- optional
- Prop
description- Type
string- Default
- —
- Requirement
- optional
- Prop
keyboardNavigation- Type
boolean- Default
- —
- Requirement
- optional
- Prop
className- Type
string- Default
- —
- Requirement
- optional
Content regions
dataSummary
Import
import { StatRing } from "@grassroot/charts-svelte";
Props
Prop
Type
Default
Requirement
valuenumber—
required
maxnumber—
optional
labelstring—
required
substring—
optional
displaystring—
optional
colorstring—
optional
ariaLabelstring—
optional
rendererChartRenderer—
optional
themePartialChartTheme—
optional
animationChartAnimationInput—
optional
titlestring—
optional
descriptionstring—
optional
classstring—
optional
- Prop
value- Type
number- Default
- —
- Requirement
- required
- Prop
max- Type
number- Default
- —
- Requirement
- optional
- Prop
label- Type
string- Default
- —
- Requirement
- required
- Prop
sub- Type
string- Default
- —
- Requirement
- optional
- Prop
display- Type
string- Default
- —
- Requirement
- optional
- Prop
color- Type
string- Default
- —
- Requirement
- optional
- Prop
ariaLabel- Type
string- Default
- —
- Requirement
- optional
- Prop
renderer- Type
ChartRenderer- Default
- —
- Requirement
- optional
- Prop
theme- Type
PartialChartTheme- Default
- —
- Requirement
- optional
- Prop
animation- Type
ChartAnimationInput- Default
- —
- Requirement
- optional
- Prop
title- Type
string- Default
- —
- Requirement
- optional
- Prop
description- Type
string- Default
- —
- Requirement
- optional
- Prop
keyboardNavigation- Type
boolean- Default
- —
- Requirement
- optional
- Prop
class- Type
string- Default
- —
- Requirement
- optional
Content regions
dataSummary
Import
import { StatRing } from "@grassroot/charts-solid";
Props
Prop
Type
Default
Requirement
valuenumber—
required
maxnumber—
optional
labelstring—
required
substring—
optional
displaystring—
optional
colorstring—
optional
classstring—
optional
ariaLabelstring—
optional
rendererChartRenderer—
optional
themePartialChartTheme—
optional
animationChartAnimationInput—
optional
titlestring—
optional
descriptionstring—
optional
- Prop
value- Type
number- Default
- —
- Requirement
- required
- Prop
max- Type
number- Default
- —
- Requirement
- optional
- Prop
label- Type
string- Default
- —
- Requirement
- required
- Prop
sub- Type
string- Default
- —
- Requirement
- optional
- Prop
display- Type
string- Default
- —
- Requirement
- optional
- Prop
color- Type
string- Default
- —
- Requirement
- optional
- Prop
class- Type
string- Default
- —
- Requirement
- optional
- Prop
ariaLabel- Type
string- Default
- —
- Requirement
- optional
- Prop
renderer- Type
ChartRenderer- Default
- —
- Requirement
- optional
- Prop
theme- Type
PartialChartTheme- Default
- —
- Requirement
- optional
- Prop
animation- Type
ChartAnimationInput- Default
- —
- Requirement
- optional
- Prop
title- Type
string- Default
- —
- Requirement
- optional
- Prop
description- Type
string- Default
- —
- Requirement
- optional
- Prop
keyboardNavigation- Type
boolean- Default
- —
- Requirement
- optional
Content regions
dataSummary