{
  "id": "chart",
  "name": "Chart",
  "level": "organism",
  "status": "stable",
  "purpose": "Line, area and column charts with a legend, a table view and keyboard readout.",
  "description": "Line, area and column charts drawn as SVG on Poesía's tokens — no charting library. The form follows the data's job (`dataviz.yaml`); series take the categorical slots in order; a legend appears from two series; every chart has a table view, a keyboard path through its points (arrow keys, Home, End, Escape) with the same readout as the pointer, and designed loading, empty and error states. `title` is the accessible name; the visible heading is yours.",
  "role": "content",
  "import": "@rrios-forge/ui/organisms/chart",
  "exports": [
    "Chart",
    "chartVariants",
    "CHART_FORMS",
    "CHART_HEIGHTS",
    "CHART_SIZES"
  ],
  "source": "packages/ui/src/organisms/chart",
  "axes": [
    {
      "axis": "form",
      "part": null,
      "values": [
        "line",
        "area",
        "column"
      ],
      "default": "line",
      "meaning": "Which chart form encodes the data — chosen by the data's job, never by the look (ADR-036)."
    },
    {
      "axis": "size",
      "part": null,
      "values": [
        "sm",
        "md",
        "lg"
      ],
      "default": "md",
      "meaning": "Ergonomic scale, in three families (control, text, container)."
    }
  ],
  "needs": [
    {
      "need": "A chart (trend, comparison, part to whole)",
      "answer": "`Chart` with the `form` the data's job names (`dataviz.yaml`); a single number is a `MetricCard`, many classes a `DataTable`"
    }
  ],
  "patterns": [],
  "a11yExceptions": [],
  "decisions": [
    {
      "id": "ADR-036",
      "title": "Data visualization: colour roles, a grammar, and three components on plain SVG"
    }
  ],
  "stories": [
    {
      "name": "Line",
      "id": "components-organisms-chart--line",
      "interaction": false,
      "snapshots": [
        "dark",
        "high-contrast",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-chart--line",
      "frame": "/iframe.html?id=components-organisms-chart--line&viewMode=story"
    },
    {
      "name": "Area",
      "id": "components-organisms-chart--area",
      "interaction": false,
      "snapshots": [
        "dark",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-chart--area",
      "frame": "/iframe.html?id=components-organisms-chart--area&viewMode=story"
    },
    {
      "name": "Column",
      "id": "components-organisms-chart--column",
      "interaction": false,
      "snapshots": [
        "dark",
        "high-contrast",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-chart--column",
      "frame": "/iframe.html?id=components-organisms-chart--column&viewMode=story"
    },
    {
      "name": "Emphasis",
      "id": "components-organisms-chart--emphasis",
      "interaction": false,
      "snapshots": [
        "dark",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-chart--emphasis",
      "frame": "/iframe.html?id=components-organisms-chart--emphasis&viewMode=story"
    },
    {
      "name": "Below zero",
      "id": "components-organisms-chart--below-zero",
      "interaction": false,
      "snapshots": [
        "dark",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-chart--below-zero",
      "frame": "/iframe.html?id=components-organisms-chart--below-zero&viewMode=story"
    },
    {
      "name": "In a Card",
      "id": "components-organisms-chart--in-a-card",
      "interaction": false,
      "snapshots": [
        "dark",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-chart--in-a-card",
      "frame": "/iframe.html?id=components-organisms-chart--in-a-card&viewMode=story"
    },
    {
      "name": "Loading",
      "id": "components-organisms-chart--loading",
      "interaction": false,
      "snapshots": [
        "dark",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-chart--loading",
      "frame": "/iframe.html?id=components-organisms-chart--loading&viewMode=story"
    },
    {
      "name": "Empty",
      "id": "components-organisms-chart--empty",
      "interaction": false,
      "snapshots": [
        "dark",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-chart--empty",
      "frame": "/iframe.html?id=components-organisms-chart--empty&viewMode=story"
    },
    {
      "name": "Error",
      "id": "components-organisms-chart--error-state",
      "interaction": false,
      "snapshots": [
        "dark",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-chart--error-state",
      "frame": "/iframe.html?id=components-organisms-chart--error-state&viewMode=story"
    },
    {
      "name": "Table view (interaction test)",
      "id": "components-organisms-chart--table-view",
      "interaction": true,
      "snapshots": [
        "dark",
        "light"
      ],
      "skipsSnapshot": false,
      "docs": "/?path=/story/components-organisms-chart--table-view",
      "frame": "/iframe.html?id=components-organisms-chart--table-view&viewMode=story"
    },
    {
      "name": "Keyboard readout (interaction test)",
      "id": "components-organisms-chart--keyboard-readout",
      "interaction": true,
      "snapshots": [],
      "skipsSnapshot": true,
      "docs": "/?path=/story/components-organisms-chart--keyboard-readout",
      "frame": "/iframe.html?id=components-organisms-chart--keyboard-readout&viewMode=story"
    }
  ],
  "storyFile": "tooling/storybook/stories/components/organisms/chart.stories.tsx"
}
