{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "vertical-profile",
  "type": "registry:component",
  "title": "Vertical profile",
  "description": "A value read down a scale, like a depth profile. Sample data: recall of Atlas 3 and Kite 2 Pro from 4K to 128K context, on a 60% to 100% scale.",
  "registryDependencies": [
    "@chartory/core",
    "@chartory/plot-profile"
  ],
  "files": [
    {
      "path": "registry/chartory/components/vertical-profile.tsx",
      "type": "registry:component",
      "target": "components/chartory/vertical-profile.tsx",
      "content": "// SPDX-License-Identifier: MIT · Copyright (c) 2026 BEY AGENCY LTD · Chartory, usechartory.com\n// Vertical profile (Chartory chart 016): 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/vertical-profile\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/016-vertical-profile/data\"\nimport { def } from \"@/lib/chartory/charts/types/016-vertical-profile/layout\"\n\nregisterChart(def, sample)\n\nexport type VerticalProfileData = typeof sample\nexport type VerticalProfileProps = Omit<ChartViewProps, \"def\" | \"data\" | \"states\"> & {\n  /** the data to draw (default: the sample) */\n  data?: VerticalProfileData\n  /** further data states: the chart morphs to them (update) or ticks through them (live, with interval) */\n  states?: VerticalProfileData[]\n}\n\nexport function VerticalProfile(props: VerticalProfileProps) {\n  return <ChartView def={def} {...props} />\n}\n"
    },
    {
      "path": "registry/chartory/charts/types/016-vertical-profile/data.ts",
      "type": "registry:lib",
      "target": "lib/chartory/charts/types/016-vertical-profile/data.ts",
      "content": "// SPDX-License-Identifier: MIT · Copyright (c) 2026 BEY AGENCY LTD · Chartory, usechartory.com\n// 016 · sample data (Figma chart/016-vertical-profile, AI: needle recall in % by context length, two models).\nimport type { ProfileData } from \"../../plots/profile\";\n\nexport const data: ProfileData = {\n  rows: [\"4K\", \"16K\", \"32K\", \"64K\", \"128K\"],\n  min: 60,\n  max: 100,\n  xt: [[60, \"60%\"], [70, \"70%\"], [80, \"80%\"], [90, \"90%\"], [100, \"100%\"]],\n  series: [\n    { name: \"atlas 3\", tok: \"data/primary\", vals: [97, 95, 92, 86, 77] },\n    { name: \"kite 2 pro\", tok: \"data/cat-2\", vals: [93, 92, 90, 88, 84] },\n  ],\n};\n"
    },
    {
      "path": "registry/chartory/charts/types/016-vertical-profile/layout.ts",
      "type": "registry:lib",
      "target": "lib/chartory/charts/types/016-vertical-profile/layout.ts",
      "content": "// SPDX-License-Identifier: MIT · Copyright (c) 2026 BEY AGENCY LTD · Chartory, usechartory.com\n// 016 Vertical profile (Figma chart/016-vertical-profile): C.profile on recall by context length for two models.\nimport type { ChartDef, TooltipSpec } from \"../../core/shell\";\nimport { profile } from \"../../plots/profile\";\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\n/** Hover tooltip: one model's profile, its recall at every context length. */\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() + \" · RECALL\",\n    rows: o.rows.map((r, i) => ({ label: r, value: s.vals[i] + \"%\", swatch: s.tok })),\n  };\n};\n\nexport const def: ChartDef = {\n  no: 16,\n  slug: \"vertical-profile\",\n  legend: [[\"data/primary\", \"Atlas 3\"], [\"data/cat-2\", \"Kite 2 Pro\"]],\n  plot: (K, p, w, d) => profile(K, p, w, (d as typeof data | undefined) ?? data),\n  tip,\n  update: (d, step) => {\n    const o = d as typeof data;\n    // later checkpoints: recall moves up to ±3 points per context length plus a point per step, inside 60–100 %\n    return { ...o, series: o.series.map((s, j) => ({ ...s, vals: s.vals.map((v, i) => clamp(v + Math.round(3 * wave(i + j * 5, step)) + step, 61, 99)) })) };\n  },\n  describe: {\n    title: \"Accuracy by context length\",\n    summary: `Needle recall by context length: Atlas 3 falls from ${data.series[0].vals[0]}% at 4K to ${data.series[0].vals[4]}% at 128K; Kite 2 Pro from ${data.series[1].vals[0]}% to ${data.series[1].vals[4]}%.`,\n    table: { head: [\"Context\", \"Atlas 3\", \"Kite 2 Pro\"], rows: data.rows.map((r, i) => [r, data.series[0].vals[i] + \"%\", data.series[1].vals[i] + \"%\"]) },\n  },\n};\n"
    }
  ],
  "categories": [
    "charts",
    "distribution"
  ],
  "meta": {
    "access": "free",
    "no": 16,
    "family": "Distribution"
  }
}
