{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "radar",
  "type": "registry:component",
  "title": "Radar",
  "description": "Two profiles across the same axes. Sample data: Atlas 3 and Kite 2 Pro scored on reasoning, code, math, tool use, speed and cost.",
  "registryDependencies": [
    "@chartory/core",
    "@chartory/plot-radar"
  ],
  "files": [
    {
      "path": "registry/chartory/components/radar.tsx",
      "type": "registry:component",
      "target": "components/chartory/radar.tsx",
      "content": "// SPDX-License-Identifier: MIT · Copyright (c) 2026 BEY AGENCY LTD · Chartory, usechartory.com\n// Radar (Chartory chart 023): sizes xs | s | m | l, laid out again from the data at each\n// size; collection \"hearth\" (default) or \"signal\" (with @chartory/signal, Code and Complete). Data in the type's shape (default: the sample). Docs:\n// https://usechartory.com/docs/charts/radar\nimport { ChartView, type ChartViewProps } from \"@/lib/chartory/charts/chart-view\"\nimport { registerChart } from \"@/lib/chartory/charts/defs\"\nimport { data as sample } from \"@/lib/chartory/charts/types/023-radar/data\"\nimport { def } from \"@/lib/chartory/charts/types/023-radar/layout\"\n\nregisterChart(def, sample)\n\nexport type RadarData = typeof sample\nexport type RadarProps = Omit<ChartViewProps, \"def\" | \"data\" | \"states\"> & {\n  /** the data to draw (default: the sample) */\n  data?: RadarData\n  /** further data states: the chart morphs to them (update) or ticks through them (live, with interval) */\n  states?: RadarData[]\n}\n\nexport function Radar(props: RadarProps) {\n  return <ChartView def={def} {...props} />\n}\n"
    },
    {
      "path": "registry/chartory/charts/types/023-radar/data.ts",
      "type": "registry:lib",
      "target": "lib/chartory/charts/types/023-radar/data.ts",
      "content": "// SPDX-License-Identifier: MIT · Copyright (c) 2026 BEY AGENCY LTD · Chartory, usechartory.com\n// 023 Radar · sample data (Figma chart/023, AI: model comparison, eval scores out of 100 on six axes).\nimport type { RadarData } from \"../../plots/radar\";\n\nexport const data: RadarData = {\n  axes: [\"REASONING\", \"CODE\", \"MATH\", \"TOOL USE\", \"SPEED\", \"COST\"],\n  max: 100,\n  series: [\n    {  name: \"Kite 2 Pro\", tok: \"data/cat-2\", vals: [76, 85, 70, 81, 77, 72]  },\n    {  name: \"Atlas 3\", tok: \"data/primary\", vals: [88, 82, 79, 74, 58, 46]  },\n  ],\n};\n"
    },
    {
      "path": "registry/chartory/charts/types/023-radar/layout.ts",
      "type": "registry:lib",
      "target": "lib/chartory/charts/types/023-radar/layout.ts",
      "content": "// SPDX-License-Identifier: MIT · Copyright (c) 2026 BEY AGENCY LTD · Chartory, usechartory.com\n// 023 Radar (Figma chart/023, \"Model comparison\"): C.radar, two models on six eval axes.\nimport type { ChartDef, TooltipSpec } from \"../../core/shell\";\nimport { radar } from \"../../plots/radar\";\nimport { data } from \"./data\";\n\n/** Deterministic wave in [-1, 1] per index and update step (no randomness: the same step gives the same period). */\nconst wave = (i: number, step: number, f = 1.7) => Math.sin(step * 2.3 + i * f + 0.5);\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\n\nconst [kite, atlas] = data.series;\nconst cap = (s: string) => s[0] + s.slice(1).toLowerCase();\n\n/** Hover tooltip: one model's shape, its score on every axis. */\nconst tip = (d: unknown, g: number): TooltipSpec => {\n  const o = d as typeof data, s = o.series[g];\n  return {\n    kind: \"range\",\n    caps: s.name.toUpperCase() + \" · EVAL SCORES\",\n    rows: o.axes.map((a, i) => ({ label: cap(a), value: String(s.vals[i]), swatch: s.tok })),\n  };\n};\n\nexport const def: ChartDef = {\n  no: 23,\n  slug: \"radar\",\n  legend: [[\"data/primary\", \"Atlas 3\"], [\"data/cat-2\", \"Kite 2 Pro\"]],\n  plot: (K, p, w, d) => radar(K, p, w, (d as typeof data | undefined) ?? data),\n  tip,\n  update: (d, step) => {\n    const o = d as typeof data;\n    // later eval runs: each score moves up to ±6 points (whole scores), inside 20–98\n    return { ...o, series: o.series.map((s, j) => ({ ...s, vals: s.vals.map((v, i) => clamp(v + Math.round(6 * wave(i + j * 6, step)), 20, 98)) })) };\n  },\n  describe: {\n    title: \"Model comparison\",\n    summary: `Eval scores out of 100 on six axes: Atlas 3 scores ${atlas.vals[0]} on reasoning against ${kite.vals[0]} for Kite 2 Pro; Kite 2 Pro leads on code (${kite.vals[1]}), tool use, speed and cost.`,\n    table: { head: [\"Axis\", \"Atlas 3\", \"Kite 2 Pro\"], rows: data.axes.map((a, i) => [cap(a), atlas.vals[i], kite.vals[i]]) },\n  },\n};\n"
    }
  ],
  "categories": [
    "charts",
    "compare-items"
  ],
  "meta": {
    "access": "free",
    "no": 23,
    "family": "Compare items"
  }
}
