Chartjs Pie

Multi-slice pie or donut chart rendered as inline SVG — category proportions with a colour-coded legend. Distinct from donut_stat which shows a single metric as a CSS ring. Adapted from the PieChart/Slice pattern in OpenUI OUI benchmark samples.

Surfaces
webmeet-stagepdfapps-script-web
Degraded on
SurfaceNote
googlechatSVG may not render; falls back to percentage list
Fields
FieldType
titlestring. Chart heading.optional
variantstring. "pie" or "donut". Default "donut".optional
data{'type': 'array', 'description': 'List of {label, value} slice objects.'}required
colorsarray of strings. Hex colours per slice; auto-assigned if omitted.optional
show_legendboolean. Show colour-keyed legend below chart. Default true.optional
show_labelsboolean. Show percentage labels on slices. Default true.optional
Example payload
{
  "type": "chartjs_pie",
  "data": [
    {
      "label": "Category A",
      "value": 40
    },
    {
      "label": "Category B",
      "value": 35
    },
    {
      "label": "Category C",
      "value": 25
    }
  ]
}
ARD catalog entry
{
  "identifier": "urn:air:a2uicatalog.ai:atom:chartjs_pie",
  "displayName": "Chartjs Pie",
  "type": "application/vnd.a2ui.atom+json",
  "url": "https://a2uicatalog.ai/atoms/chartjs_pie",
  "capabilities": [
    "web",
    "meet-stage",
    "pdf",
    "apps-script-web"
  ],
  "description": "Multi-slice pie or donut chart rendered as inline SVG \u2014 category proportions with a colour-coded legend. Distinct from donut_stat which shows a single metric as a CSS ring. Adapted from the PieChart/Slice pattern in OpenUI OUI benchmark samples.",
  "representativeQueries": [
    "show a multi-slice pie or donut SVG chart with legend",
    "multi-slice pie or donut chart rendered as inline svg \u2014 category proportions with a colour-coded leg",
    "render a chartjs pie"
  ]
}
← Full ARD catalog Try it live →
Deploy your own renderer

The renderer is open source. Deploy your own instance in 4 commands — you own the URL, no dependency on the demo endpoint.

git clone https://github.com/a2uicatalog/a2ui
cd apps-script-surface/gas-schema-renderer
clasp push && clasp deploy
Full deploy guide →