Docs Charts Core charts

StatRing

React example follows below.
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>
);
}
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>
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;
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>
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
value
number
—
required
label
string
—
required
sub
string | undefined
—
optional
display
string | undefined
—
optional
color
string | undefined
—
optional
renderer
ChartRenderer | undefined
—
optional
className
string | undefined
—
optional
theme
import("@grassroot/theme").PartialChartTheme | undefined
—
optional
animation
import("@grassroot/theme").ChartAnimationInput | undefined
—
optional
title
string | undefined
—
optional
description
string | undefined
—
optional
ariaLabel
string | undefined
—
optional
keyboardNavigation
boolean | undefined
—
optional
Prop
value
Type
number
Default
—
Requirement
required
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
value
number
—
required
max
number | undefined
—
optional
label
string
—
required
sub
string | undefined
—
optional
display
string | undefined
—
optional
color
string | undefined
—
optional
ariaLabel
string | undefined
—
optional
renderer
ChartRenderer | undefined
—
optional
theme
PartialChartTheme | undefined
—
optional
animation
ChartAnimationInput | undefined
—
optional
title
string | undefined
—
optional
description
string | undefined
—
optional
keyboardNavigation
boolean | undefined
—
optional
className
string | 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
value
number
—
required
max
number
100
optional
label
string
—
required
sub
string
—
optional
display
string
—
optional
color
string
—
optional
ariaLabel
string
—
optional
renderer
ChartRenderer
—
optional
theme
PartialChartTheme
—
optional
animation
ChartAnimationInput
—
optional
title
string
—
optional
description
string
—
optional
keyboardNavigation
boolean
—
optional
className
string
—
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
value
number
—
required
max
number
—
optional
label
string
—
required
sub
string
—
optional
display
string
—
optional
color
string
—
optional
ariaLabel
string
—
optional
renderer
ChartRenderer
—
optional
theme
PartialChartTheme
—
optional
animation
ChartAnimationInput
—
optional
title
string
—
optional
description
string
—
optional
keyboardNavigation
boolean
—
optional
class
string
—
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
value
number
—
required
max
number
—
optional
label
string
—
required
sub
string
—
optional
display
string
—
optional
color
string
—
optional
class
string
—
optional
ariaLabel
string
—
optional
renderer
ChartRenderer
—
optional
theme
PartialChartTheme
—
optional
animation
ChartAnimationInput
—
optional
title
string
—
optional
description
string
—
optional
keyboardNavigation
boolean
—
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