Docs Charts Primitives

Glyph

React example follows below.
ts
import { Glyph } from "@grassroot/charts-react";
export default function GlyphDemo() {
return (
<div>
<svg
viewBox="0 0 360 220"
width="360"
height="220"
style={{ maxWidth: "100%" }}
role="img"
aria-label="Warehouse status for Manchester, London, Bristol, and Leeds, August 2026"
>
<title>Regional warehouse status markers</title>
<Glyph x={86} y={48} shape="circle" size={16} fill="var(--vs-success)" />
<text x={108} y={52} fontSize={12} fill="var(--vs-chart-ink)">
Manchester · on target
</text>
<Glyph x={86} y={88} shape="square" size={16} fill="var(--vs-warning)" />
<text x={108} y={92} fontSize={12} fill="var(--vs-chart-ink)">
London · watch
</text>
<Glyph x={86} y={128} shape="circle" size={16} fill="var(--vs-success)" />
<text x={108} y={132} fontSize={12} fill="var(--vs-chart-ink)">
Bristol · on target
</text>
<Glyph x={86} y={168} shape="triangle" size={16} fill="var(--vs-error)" />
<text x={108} y={172} fontSize={12} fill="var(--vs-chart-ink)">
Leeds · delayed
</text>
</svg>
</div>
);
}
ts
<script setup lang="ts">
import { Glyph } from "@grassroot/charts-vue";
</script>
<template>
<svg
viewBox="0 0 360 220"
width="360"
height="220"
style="max-width: 100%"
role="img"
aria-label="Warehouse status for Manchester, London, Bristol, and Leeds, August 2026"
>
<title>Regional warehouse status markers</title>
<Glyph :x="86" :y="48" shape="circle" :size="16" fill="var(--vs-success)" />
<text x="108" y="52" font-size="12" fill="var(--vs-chart-ink)">Manchester · on target</text>
<Glyph :x="86" :y="88" shape="square" :size="16" fill="var(--vs-warning)" />
<text x="108" y="92" font-size="12" fill="var(--vs-chart-ink)">London · watch</text>
<Glyph :x="86" :y="128" shape="circle" :size="16" fill="var(--vs-success)" />
<text x="108" y="132" font-size="12" fill="var(--vs-chart-ink)">Bristol · on target</text>
<Glyph :x="86" :y="168" shape="triangle" :size="16" fill="var(--vs-error)" />
<text x="108" y="172" font-size="12" fill="var(--vs-chart-ink)">Leeds · delayed</text>
</svg>
</template>
ts
import { ChangeDetectionStrategy, Component } from "@angular/core";
import { GrassrootGlyph } from "@grassroot/charts-angular";
@Component({
selector: "app-glyph-chart-demo",
standalone: true,
imports: [GrassrootGlyph],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `<svg
viewBox="0 0 360 220"
width="360"
height="220"
style="max-width: 100%"
role="img"
aria-label="Warehouse status for Manchester, London, Bristol, and Leeds, August 2026"
>
<title>Regional warehouse status markers</title>
<g grassroot-glyph [x]="86" [y]="48" shape="circle" [size]="16" fill="var(--vs-success)"></g>
<text x="108" y="52" font-size="12" fill="var(--vs-chart-ink)">Manchester · on target</text>
<g grassroot-glyph [x]="86" [y]="88" shape="square" [size]="16" fill="var(--vs-warning)"></g>
<text x="108" y="92" font-size="12" fill="var(--vs-chart-ink)">London · watch</text>
<g grassroot-glyph [x]="86" [y]="128" shape="circle" [size]="16" fill="var(--vs-success)"></g>
<text x="108" y="132" font-size="12" fill="var(--vs-chart-ink)">Bristol · on target</text>
<g grassroot-glyph [x]="86" [y]="168" shape="triangle" [size]="16" fill="var(--vs-error)"></g>
<text x="108" y="172" font-size="12" fill="var(--vs-chart-ink)">Leeds · delayed</text>
</svg>`,
})
export class GlyphDemoComponent {}
export default GlyphDemoComponent;
ts
<script lang="ts">
import { Glyph } from "@grassroot/charts-svelte";
</script>
<svg
viewBox="0 0 360 220"
width="360"
height="220"
style="max-width: 100%"
role="img"
aria-label="Warehouse status for Manchester, London, Bristol, and Leeds, August 2026"
>
<title>Regional warehouse status markers</title>
<Glyph x={86} y={48} shape="circle" size={16} fill="var(--vs-success)" />
<text x="108" y="52" font-size="12" fill="var(--vs-chart-ink)">Manchester · on target</text>
<Glyph x={86} y={88} shape="square" size={16} fill="var(--vs-warning)" />
<text x="108" y="92" font-size="12" fill="var(--vs-chart-ink)">London · watch</text>
<Glyph x={86} y={128} shape="circle" size={16} fill="var(--vs-success)" />
<text x="108" y="132" font-size="12" fill="var(--vs-chart-ink)">Bristol · on target</text>
<Glyph x={86} y={168} shape="triangle" size={16} fill="var(--vs-error)" />
<text x="108" y="172" font-size="12" fill="var(--vs-chart-ink)">Leeds · delayed</text>
</svg>
ts
/** @jsxImportSource solid-js */
import { Glyph } from "@grassroot/charts-solid";
export default function GlyphDemo() {
return (
<svg
viewBox="0 0 360 220"
width="360"
height="220"
style={{ "max-width": "100%" }}
role="img"
aria-label="Warehouse status for Manchester, London, Bristol, and Leeds, August 2026"
>
<title>Regional warehouse status markers</title>
<Glyph x={86} y={48} shape="circle" size={16} fill="var(--vs-success)" />
<text x="108" y="52" font-size="12" fill="var(--vs-chart-ink)">
Manchester · on target
</text>
<Glyph x={86} y={88} shape="square" size={16} fill="var(--vs-warning)" />
<text x="108" y="92" font-size="12" fill="var(--vs-chart-ink)">
London · watch
</text>
<Glyph x={86} y={128} shape="circle" size={16} fill="var(--vs-success)" />
<text x="108" y="132" font-size="12" fill="var(--vs-chart-ink)">
Bristol · on target
</text>
<Glyph x={86} y={168} shape="triangle" size={16} fill="var(--vs-error)" />
<text x="108" y="172" font-size="12" fill="var(--vs-chart-ink)">
Leeds · delayed
</text>
</svg>
);
}

Installation

API Reference

Import

import { Glyph } from "@grassroot/charts-react";

Props

Prop
Type
Default
Requirement
x
number
required
y
number
required
size
number | undefined
optional
shape
GlyphShape | undefined
optional
fill
string | undefined
optional
stroke
string | undefined
optional
className
string | undefined
optional
style
React.CSSProperties | undefined
optional
Prop
x
Type
number
Default
Requirement
required
Prop
y
Type
number
Default
Requirement
required
Prop
size
Type
number | undefined
Default
Requirement
optional
Prop
shape
Type
GlyphShape | undefined
Default
Requirement
optional
Prop
fill
Type
string | undefined
Default
Requirement
optional
Prop
stroke
Type
string | undefined
Default
Requirement
optional
Prop
className
Type
string | undefined
Default
Requirement
optional
Prop
style
Type
React.CSSProperties | undefined
Default
Requirement
optional

Import

import { Glyph } from "@grassroot/charts-vue";

Props

Prop
Type
Default
Requirement
x
number
required
y
number
required
size
number | undefined
6
optional
shape
GlyphShape | undefined
"circle"
optional
fill
string | undefined
"var(--accent, #b5342a)"
optional
stroke
string | undefined
optional
Prop
x
Type
number
Default
Requirement
required
Prop
y
Type
number
Default
Requirement
required
Prop
size
Type
number | undefined
Default
6
Requirement
optional
Prop
shape
Type
GlyphShape | undefined
Default
"circle"
Requirement
optional
Prop
fill
Type
string | undefined
Default
"var(--accent, #b5342a)"
Requirement
optional
Prop
stroke
Type
string | undefined
Default
Requirement
optional

Import

import { ChangeDetectionStrategy, Component } from "@angular/core";
import { GrassrootGlyph } from "@grassroot/charts-angular";

Props

Prop
Type
Default
Requirement
x
number
required
y
number
required
size
number
6
optional
shape
GlyphShape
"circle"
optional
fill
string
"var(--accent, #b5342a)"
optional
stroke
string
optional
Prop
x
Type
number
Default
Requirement
required
Prop
y
Type
number
Default
Requirement
required
Prop
size
Type
number
Default
6
Requirement
optional
Prop
shape
Type
GlyphShape
Default
"circle"
Requirement
optional
Prop
fill
Type
string
Default
"var(--accent, #b5342a)"
Requirement
optional
Prop
stroke
Type
string
Default
Requirement
optional

Import

import { Glyph } from "@grassroot/charts-svelte";

Props

Prop
Type
Default
Requirement
x
number
required
y
number
required
size
number
6
optional
shape
GlyphShape
"circle"
optional
fill
string
"var(--accent, #b5342a)"
optional
stroke
string
optional
class
string
optional
Prop
x
Type
number
Default
Requirement
required
Prop
y
Type
number
Default
Requirement
required
Prop
size
Type
number
Default
6
Requirement
optional
Prop
shape
Type
GlyphShape
Default
"circle"
Requirement
optional
Prop
fill
Type
string
Default
"var(--accent, #b5342a)"
Requirement
optional
Prop
stroke
Type
string
Default
Requirement
optional
Prop
class
Type
string
Default
Requirement
optional

Import

import { Glyph } from "@grassroot/charts-solid";

Props

Prop
Type
Default
Requirement
x
number
required
y
number
required
size
number
6
optional
shape
GlyphShape
"circle"
optional
fill
string
"var(--accent, #b5342a)"
optional
stroke
string
optional
class
string
optional
style
JSX.CSSProperties
optional
Prop
x
Type
number
Default
Requirement
required
Prop
y
Type
number
Default
Requirement
required
Prop
size
Type
number
Default
6
Requirement
optional
Prop
shape
Type
GlyphShape
Default
"circle"
Requirement
optional
Prop
fill
Type
string
Default
"var(--accent, #b5342a)"
Requirement
optional
Prop
stroke
Type
string
Default
Requirement
optional
Prop
class
Type
string
Default
Requirement
optional
Prop
style
Type
JSX.CSSProperties
Default
Requirement
optional