artifacts.space/Docs
Sign in

Get started

  • Introduction
  • Quickstart
  • Client setup

Reference

  • MCP reference
  • Formats
  • Themes

Work together

  • Sharing, teams, and agents

Run it

  • Limits and quotas
  • Self-hosting

Earlier formats

  • JSON Render
  • Components

    Layout

    • Section
    • Stack
    • Grid
    • Card
    • Tabs
    • Accordion
    • Separator
    • Box

    Content

    • Heading
    • Text
    • Markdown
    • Code
    • Callout
    • Badge
    • List
    • Steps
    • Link
    • Quote
    • Icon
    • Avatar
    • AvatarGroup
    • Kbd
    • Rating

    Data

    • Table
    • Metric
    • Chart
    • KeyValue
    • Progress
    • Timeline
    • Diagram

    Planning

    • Board
    • Calendar

    Inputs

    • Checklist
    • Checkbox
    • Select
    • Switch
    • Slider
    • Button
    • Input
    • Textarea

    Media

    • Image
    • File
    • Placeholder
  • Dynamic props and actions
  • Charts
  • Section templates
  • Validation
  • Stout guarantees
  • Playground
  • Prompting your agent
artifacts.space
DocsSourceSign inCreate accountSupportPrivacyTerms

© 2026 Webrenew LLC

Components · Data

Chart

A chart. type: bar, line, or area (labels are the x-axis; each series has one value per label, null for a gap); pie or donut (one series; labels name the slices; values zero or more; more than 8 slices fold into "Other"); scatter (each series has points [{ x, y, label? }]; no labels). Several bar series draw grouped bars; stacked: true stacks bar or area series. format styles values (y); xFormat styles scatter x values; xLabel/yLabel name the axes.

ExamplesLink to this section

Line
Open bugs by week
0102030
W1W2W3W4W5W6
W1W3W5W6
LabelOpen bugs
W121
W218
W315
W412
W510
W67
Show JSONHide JSON
{
  "version": 1,
  "root": "chart",
  "elements": {
    "chart": {
      "type": "Chart",
      "props": {
        "type": "line",
        "title": "Open bugs by week",
        "labels": ["W1", "W2", "W3", "W4", "W5", "W6"],
        "series": [{ "name": "Open bugs", "values": [21, 18, 15, 12, 10, 7] }]
      }
    }
  }
}
Grouped bars with currency
Spend by team
  • Platform
  • Web

Spend

$0$20,000$40,000$60,000
Q1Q2Q3Q4
Q1Q2Q3Q4

Quarter

QuarterPlatformWeb
Q1$42,000$18,000
Q2$45,500$21,000
Q3$39,000$22,400
Q4$51,200$25,100
Show JSONHide JSON
{
  "version": 1,
  "root": "chart",
  "elements": {
    "chart": {
      "type": "Chart",
      "props": {
        "type": "bar",
        "title": "Spend by team",
        "format": "currency",
        "currency": "USD",
        "labels": ["Q1", "Q2", "Q3", "Q4"],
        "series": [
          { "name": "Platform", "values": [42000, 45500, 39000, 51200] },
          { "name": "Web", "values": [18000, 21000, 22400, 25100] }
        ],
        "xLabel": "Quarter",
        "yLabel": "Spend"
      }
    }
  }
}
Donut
Traffic by source
Total10,340
  • Search5,40052.2%
  • Direct3,10030%
  • Social1,20011.6%
  • Email6406.2%

LabelVisitsShare
Search5,40052.2%
Direct3,10030%
Social1,20011.6%
Email6406.2%
Show JSONHide JSON
{
  "version": 1,
  "root": "chart",
  "elements": {
    "chart": {
      "type": "Chart",
      "props": {
        "type": "donut",
        "title": "Traffic by source",
        "labels": ["Search", "Direct", "Social", "Email"],
        "series": [{ "name": "Visits", "values": [5400, 3100, 1200, 640] }]
      }
    }
  }
}

PropsLink to this section

Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.

PropTypeLimits and defaults
typerequired"bar" | "line" | "area" | "pie" | "donut" | "scatter"—
labelsstring[]max 200 items
seriesrequiredobject[]1–8 items
series[].namerequiredstringmax 60 chars
series[].values(number | null)[]max 200 items
series[].pointsobject[]max 500 items
series[].points[].xrequirednumber—
series[].points[].yrequirednumber—
series[].points[].labelstringmax 80 chars
titlestringmax 160 chars
format"number" | "compact" | "percent" | "currency"—
currencystring3-letter code
height"sm" | "md" | "lg"—
stackedboolean—
xLabelstringmax 60 chars
yLabelstringmax 60 chars
xFormat"number" | "compact" | "percent" | "currency"—

RulesLink to this section

  • bar, line, and area: each series has one value per label (null for a gap).
  • pie and donut: exactly one series, values zero or more. More than 8 slices fold into "Other".
  • scatter: series carry points instead of values, and the chart has no labels.
  • stacked works with bar and area only.
  • See the Charts page for every type and the format rules.

Children and eventsLink to this section

Chart is a leaf: it does not show children. Validation warns when a leaf has some; wrap them in a Stack or Card instead.

It emits no events.

Edit this page on GitHub
PreviousMetricNextKeyValue

On this page

  • Examples
  • Props
  • Rules
  • Children and events