[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69BH3V1GEMX9WGDBE06N4AP":3,"skill-same:01M69BH3V1GEMX9WGDBE06N4AP":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":54,"linkOnly":55,"markdownContent":56,"markdownBody":57,"frontMatter":58,"refName":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":17,"ownerHtmlUrl":64,"ownerBlogUrl":65,"ownerDescription":66,"updatedAt":67,"install":68,"resources":81},"01M69BH3V1GEMX9WGDBE06N4AP","graphein-visuals","Graphein 图表可视化实现","Use when adding a chart, graph, plot, KPI, table, or any data visualization to this app. Charts are authored as Graphein specs — one chart = one JSON `ChartSpec` (a `type`, a tidy `data` array, and an `encoding` that names the columns) rendered by the bundled `\u003CChart spec={…} \u002F>` component (`@\u002Fcomponents\u002FChart`). Covers the spec model, the chart-type catalog (line\u002Farea\u002Fbar\u002Fscatter\u002Fpie\u002Fheatmap\u002Fhistogram\u002Fcombo\u002Ffunnel\u002Ftreemap\u002Fwaterfall\u002F gauge\u002Fbullet\u002FcalendarHeatmap\u002Fslope\u002Fdumbbell\u002Ftable\u002Fmatrix\u002Fbox\u002Fsankey\u002Fchoropleth), encodings and field types, in-spec transforms\u002Fannotations\u002Ftrendline\u002Ffacet, value formatting, cross-chart selections, `validateSpec`, and gotchas. Triggers: chart, graph, plot, visualize, dashboard, bar chart, line chart, pie, scatter, heatmap, KPI, metric, table, Graphein, spec, dataviz.","当向本应用添加图表、图形、绘图、KPI、表格或任何数据可视化时使用。图表以 Graphein 规范编写——一张图即一个 JSON `ChartSpec`（包含 `type`、整洁的 `data` 数组，以及命名各列的 `encoding`），由内置的 `\u003CChart spec={…} \u002F>` 组件（`@\u002Fcomponents\u002FChart`）渲染。涵盖规范模型、图表类型目录（line\u002Farea\u002Fbar\u002Fscatter\u002Fpie\u002Fheatmap\u002Fhistogram\u002Fcombo\u002Ffunnel\u002Ftreemap\u002Fwaterfall\u002Fgauge\u002Fbullet\u002FcalendarHeatmap\u002Fslope\u002Fdumbbell\u002Ftable\u002Fmatrix\u002Fbox\u002Fsankey\u002Fchoropleth）、编码与字段类型、规范内的变换\u002F标注\u002F趋势线\u002F分面、数值格式化、跨图表选择、`validateSpec` 以及常见注意事项。触发词：图表、图形、绘图、可视化、仪表板、柱状图、折线图、饼图、散点图、热力图、KPI、指标、表格、Graphein、spec、数据可视化。","microsoft\u002Fawesome-rayfin","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69BFJTNT39H6W8XT2H1BZDN",114,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fawesome-rayfin\u002Fblob\u002Fmain\u002Ftemplates\u002Funiversal-app\u002F.agents\u002Fskills\u002Fgraphein-visuals\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQGD4CMBM6B4PWSM1NXGT9","数据分析与报告","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53],"visuals","graphein visuals","tidy","when","matrix","types","transforms","columns","line","facet","chart","calendarheatmap","app","model","spec","Charts","data","visualization","data visualization","component","components","dashboard","visualize","2026-11-10 10:12:30",false,"---\nname: graphein-visuals\ndescription: >\n  Use when adding a chart, graph, plot, KPI, table, or any data visualization to\n  this app. Charts are authored as Graphein specs — one chart = one JSON\n  `ChartSpec` (a `type`, a tidy `data` array, and an `encoding` that names the\n  columns) rendered by the bundled `\u003CChart spec={…} \u002F>` component\n  (`@\u002Fcomponents\u002FChart`). Covers the spec model, the chart-type catalog\n  (line\u002Farea\u002Fbar\u002Fscatter\u002Fpie\u002Fheatmap\u002Fhistogram\u002Fcombo\u002Ffunnel\u002Ftreemap\u002Fwaterfall\u002F\n  gauge\u002Fbullet\u002FcalendarHeatmap\u002Fslope\u002Fdumbbell\u002Ftable\u002Fmatrix\u002Fbox\u002Fsankey\u002Fchoropleth),\n  encodings and field types, in-spec transforms\u002Fannotations\u002Ftrendline\u002Ffacet,\n  value formatting, cross-chart selections, `validateSpec`, and gotchas.\n  Triggers: chart, graph, plot, visualize, dashboard, bar chart, line chart,\n  pie, scatter, heatmap, KPI, metric, table, Graphein, spec, dataviz.\n---\n\n# Graphein visuals — author a spec, drop it in `\u003CChart>`\n\n**One chart is one JSON object.** You don't hand-write SVG or wire a charting\nlibrary. You (1) shape your data into plain rows, (2) author a single Graphein\n[`ChartSpec`](https:\u002F\u002Fgithub.com\u002Fspatney\u002Fgraphein\u002Fblob\u002Fmain\u002Fdocs\u002Fspec-reference.md)\n— a `type`, a tidy `data` array, and an `encoding` that names the columns — and\n(3) render it with the bundled `\u003CChart>` component. Graphein owns axes, scales,\nticks, color, the legend, tooltips, number\u002Fdate formatting, responsive sizing,\nanimation, and dark mode.\n\n> `graphein` is a framework-agnostic canvas engine (no React entry of its own),\n> so this app ships a thin binding at `src\u002Fcomponents\u002FChart.tsx` (+ `useChart.ts`).\n> Always render through `\u003CChart>` — don't call `render()` from `graphein`\n> directly in components.\n\n## Fast path\n\n```tsx\nimport { Chart } from '@\u002Fcomponents\u002FChart';\nimport type { ChartSpec } from 'graphein';\n\nconst spec: ChartSpec = {\n  type: 'bar',\n  title: 'Revenue by region',\n  data: [\n    { region: 'North', revenue: 4200 },\n    { region: 'South', revenue: 3100 },\n    { region: 'East', revenue: 5300 },\n    { region: 'West', revenue: 2600 },\n  ],\n  encoding: {\n    x: { field: 'region', type: 'nominal' },\n    y: { field: 'revenue', type: 'quantitative', format: '$,.0f' },\n  },\n};\n\nexport function RevenueCard() {\n  \u002F\u002F The chart fills its parent, so give the parent an explicit size.\n  return (\n    \u003Cdiv style={{ width: '100%', height: 360 }}>\n      \u003CChart spec={spec} \u002F>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n**Size the parent.** `\u003CChart>` fills its container (`width\u002Fheight: 100%`); it\ndraws nothing in a zero-height box. Wrap it in an element with a real height\n(fixed px, a grid\u002Fflex track, or `100%` of a sized ancestor).\n\n**Keep the spec stable.** Pass a memoized or module-constant spec. A brand-new\nobject every render replays the entrance animation — use `useMemo` when the spec\ndepends on props\u002Fstate.\n\n## Shape data as a tidy table\n\nGraphein expects **long\u002Ftidy** data: one row per observation, one column per\nvariable. The *same* table drives every chart — point different channels at\ncolumns. To compare groups, add a `series` channel — **don't pre-pivot** into\none column per group.\n\n```ts\n\u002F\u002F Good (tidy): one row per month × region\n[{ month: '2024-01', region: 'North', revenue: 4200 },\n { month: '2024-01', region: 'South', revenue: 3100 }]\n\u002F\u002F encoding: x=month, y=revenue, series=region  → multi-series line\u002Fbar\n```\n\nRows are plain JSON — no functions, no DOM nodes, no `Date` objects. For time\naxes, pass ISO strings (`\"2024-01\"`, `\"2024-01-15\"`) or epoch ms and set\n`type: \"temporal\"`.\n\n## Encoding & field definitions\n\nCartesian charts (`line`\u002F`area`\u002F`bar`\u002F`scatter`) plus `pie`\u002F`heatmap`\u002F`funnel`\u002F\n`treemap`\u002F`waterfall`\u002F`calendarHeatmap`\u002F`dumbbell`\u002F`slope`\u002F`combo` map columns\nonto channels via `encoding`:\n\n| Channel | Used by | Purpose |\n| --- | --- | --- |\n| `x` | line, area, bar, scatter, heatmap, histogram, combo, slope, calendarHeatmap | Horizontal position \u002F bin field |\n| `y` | line, area, bar, scatter, heatmap, slope | Vertical position |\n| `series` | line, area, bar, slope | Split into multiple series |\n| `size` | scatter | Bubble radius |\n| `color` | heatmap, pie, treemap, calendarHeatmap | Continuous color or category |\n| `theta` | pie | Slice value |\n| `stage` \u002F `value` | funnel, waterfall | Ordered stage \u002F stage value |\n| `category` \u002F `value` \u002F `group` | treemap, dumbbell | Leaf identity \u002F measure \u002F parent |\n| `date` | calendarHeatmap | Date field → one cell per day |\n\n**`FieldDef`** = `{ field, type?, aggregate?, title?, format?, scale? }`:\n\n- `field` (**required**) — column name; dotted paths (`a.b`) read nested values.\n- `type` — `quantitative | temporal | ordinal | nominal` (inferred when omitted;\n  set it explicitly for time axes and to avoid surprises).\n- `format` — a [format hint](#value-formatting) for labels \u002F ticks \u002F tooltips.\n- `aggregate` — `sum | mean | avg | min | max | count | countDistinct | median |\n  first | last` when grouping.\n\n`gauge` and `bullet` use a top-level `value: { field }` instead of `encoding`.\n\n## Chart-type catalog\n\nPick the closest type; there is no custom-chart escape hatch — re-express exotic\nshapes with the nearest supported type.\n\n- **line \u002F area** — `x`, `y`, optional `series`. line: `points?`, `area?`,\n  `curve?`. area: `stack?` (totals). `curve`: `linear|monotone|step|stepBefore|\n  stepAfter|catmullRom`.\n- **bar** — `x`, `y`, optional `series`. `stack?` (else side-by-side groups),\n  `cornerRadius?`, `orientation?: 'vertical'|'horizontal'` (horizontal swaps\n  axes; keep `x`=category, `y`=value). For top-N, sort rows by value.\n- **scatter** — `x`, `y`, optional `size` (bubbles), `series` (colored groups).\n- **pie \u002F donut** — `theta` (value) + `color` (category). `donut?: true | 0..1`\n  inner-radius ratio. `labels?`.\n- **heatmap** — `x`, `y` (categories) + `color` (measure). `scheme?:\n  blues|teal|viridis|magma|greys`.\n- **histogram** — `x` (the numeric measure); auto-bins. `bin?: { maxbins?, step? }`.\n- **combo (dual-axis)** — shared `x` + `layers: [{ mark:'bar'|'line'|'area',\n  axis:'left'|'right', encoding:{ y } }]` for measures on independent scales.\n- **funnel** — `stage` + `value`. `percent?: 'first'|'previous'`, `labels?`.\n- **treemap** — `category` + `value`, optional `group` + `color`.\n- **waterfall** — `stage` + `value` (signed). `totals?: string[]`.\n- **gauge \u002F bullet** — top-level `value: { field }`. gauge: `min?`, `max?`.\n  bullet: `target?: { field }` + `encoding.label`.\n- **calendarHeatmap** — `date` + `color`. `scheme?`.\n- **slope** — `x` (two values), `y`, `series`.\n- **dumbbell** — `category` + `value` + `group` (2+ points per category).\n- **table** — `columns: TableColumn[]` (`field, title, format, align, width,\n  sortable, conditionalFormat, total, …`), `totals?`, `density?`.\n- **matrix (pivot)** — `rows`, `columns`, `values: [{ field, op, label?, format?,\n  conditionalFormat?, showAs? }]`, `subtotals?`, `grandTotals?`.\n- **box \u002F sankey \u002F choropleth** — distributions \u002F flows (`source`+`target`+\n  `value`) \u002F geography (`geo` + `key` + `color`). Rare; see the library docs.\n\n## In-spec features (declarative, on `BaseSpec`)\n\nReshape and enrich a spec without touching your data pipeline:\n\n- `transform: Transform[]` — `aggregate`, `bin`, `filter`, `fold`, `timeUnit`,\n  `calculate` run before the chart builds.\n- `annotations: Annotation[]` — reference lines\u002Fbands\u002Fzones + point callouts,\n  e.g. a target line: `annotations: [{ type: 'line', axis: 'y', value: 5000,\n  label: 'Target' }]`.\n- `insights: true` — auto-mark the max & min (opt into `outliers`).\n- `trendline: true` — linear line of best fit (line\u002Fscatter).\n- `facet: { field, columns? }` — small-multiples trellis, one panel per category.\n- `title`, `legend`, `tooltip`, `axes`, `animation`, `description` (a11y).\n\n## Value formatting\n\nFormat inside the spec (never pre-format numbers to strings). A subset of\nd3-format for numbers, strftime for dates:\n\n| Hint | Input → Output |\n| --- | --- |\n| `,d` | `1234567` → `1,234,567` |\n| `.1f` | `3.14159` → `3.1` |\n| `.0%` | `0.42` → `42%` |\n| `$,.0f` | `5230` → `$5,230` |\n| `.2s` | `1234567` → `1.2M` |\n\nDates: any hint with `%` is a date pattern — `%b %e, %Y` → `Jan 2, 2024`\n(`%Y`\u002F`%y` year, `%m` month, `%d`\u002F`%e` day, `%B`\u002F`%b` month name, `%H:%M` time).\n\n## Theming\n\nThis template has no design-token system, so charts render with **Graphein's\nbuilt-in theme** (teal accent, slate neutrals, a 10-hue categorical palette) and\nit is dark-mode aware. To recolor, set `spec.theme` (a `ThemeInput`) — e.g.\n`theme: { colors: { accent: '#7c3aed' } }` — or pass a palette. Keep colors in\nthe spec; don't hand-paint marks.\n\n## Interactivity (cross-chart selections)\n\nCharts can publish\u002Fconsume named selections. Create one shared bus and pass the\n**same** `store` to several `\u003CChart>`s to cross-highlight \u002F cross-filter:\n\n```tsx\nimport { useMemo } from 'react';\nimport { createSelectionStore } from 'graphein';\nimport { Chart } from '@\u002Fcomponents\u002FChart';\n\nconst store = useMemo(() => createSelectionStore(), []);\n\n\u002F\u002F Publisher: clicking a bar sets the \"pick\" selection\n\u003CChart store={store} spec={{ type: 'bar', data: rows,\n  params: [{ name: 'pick', select: { type: 'point', fields: ['region'] } }],\n  encoding: { x: { field: 'region' }, y: { field: 'revenue' } } }} \u002F>\n\n\u002F\u002F Consumer: dims non-matching rows when \"pick\" changes\n\u003CChart store={store} spec={{ type: 'line', data: rows, highlight: { param: 'pick' },\n  encoding: { x: { field: 'month', type: 'temporal' },\n              y: { field: 'revenue' }, series: { field: 'region' } } }} \u002F>\n```\n\n`filter` clauses (`{ param }`, `{ field, equals|oneOf|range|contains }`) subset\nrows. Observe changes via `\u003CChart onSelectionChange={(name, value) => …} \u002F>`.\n\n## Validate & self-check\n\nBefore shipping a spec, sanity-check it:\n\n```ts\nimport { validateSpec } from 'graphein';\nconst { valid, errors, warnings } = validateSpec(spec);\n```\n\nCommon failures `validateSpec` catches:\n\n- **Missing `encoding`** for the type (`line`\u002F`area`\u002F`bar`\u002F`scatter` need `x`+`y`;\n  `pie` needs `theta`+`color`; `heatmap` needs `x`+`y`+`color`; `funnel` needs\n  `stage`+`value`).\n- **A `field` that doesn't exist** in the data rows (a typo silently drops the\n  channel).\n- **Pre-pivoted \u002F wide data** — pass tidy rows and split with `series`.\n\nEmpty `data` renders an empty chart — show a real empty\u002Floading state in the UI\nrather than shipping placeholder rows.\n\n## Gotchas\n\n- Render through `\u003CChart>`, not `render()` — the binding handles mount\u002Fupdate\u002F\n  teardown and is StrictMode-safe.\n- Give the chart's parent an explicit height, or it collapses to nothing.\n- Memoize specs built from props\u002Fstate so they don't re-animate every render.\n- No custom-chart escape hatch — re-express with the closest supported type.\n- Everything is plain JSON: no functions, no DOM nodes, no `Date` objects.\n","# Graphein visuals — author a spec, drop it in `\u003CChart>`\n\n**One chart is one JSON object.** You don't hand-write SVG or wire a charting\nlibrary. You (1) shape your data into plain rows, (2) author a single Graphein\n[`ChartSpec`](https:\u002F\u002Fgithub.com\u002Fspatney\u002Fgraphein\u002Fblob\u002Fmain\u002Fdocs\u002Fspec-reference.md)\n— a `type`, a tidy `data` array, and an `encoding` that names the columns — and\n(3) render it with the bundled `\u003CChart>` component. Graphein owns axes, scales,\nticks, color, the legend, tooltips, number\u002Fdate formatting, responsive sizing,\nanimation, and dark mode.\n\n> `graphein` is a framework-agnostic canvas engine (no React entry of its own),\n> so this app ships a thin binding at `src\u002Fcomponents\u002FChart.tsx` (+ `useChart.ts`).\n> Always render through `\u003CChart>` — don't call `render()` from `graphein`\n> directly in components.\n\n## Fast path\n\n```tsx\nimport { Chart } from '@\u002Fcomponents\u002FChart';\nimport type { ChartSpec } from 'graphein';\n\nconst spec: ChartSpec = {\n  type: 'bar',\n  title: 'Revenue by region',\n  data: [\n    { region: 'North', revenue: 4200 },\n    { region: 'South', revenue: 3100 },\n    { region: 'East', revenue: 5300 },\n    { region: 'West', revenue: 2600 },\n  ],\n  encoding: {\n    x: { field: 'region', type: 'nominal' },\n    y: { field: 'revenue', type: 'quantitative', format: '$,.0f' },\n  },\n};\n\nexport function RevenueCard() {\n  \u002F\u002F The chart fills its parent, so give the parent an explicit size.\n  return (\n    \u003Cdiv style={{ width: '100%', height: 360 }}>\n      \u003CChart spec={spec} \u002F>\n    \u003C\u002Fdiv>\n  );\n}\n```\n\n**Size the parent.** `\u003CChart>` fills its container (`width\u002Fheight: 100%`); it\ndraws nothing in a zero-height box. Wrap it in an element with a real height\n(fixed px, a grid\u002Fflex track, or `100%` of a sized ancestor).\n\n**Keep the spec stable.** Pass a memoized or module-constant spec. A brand-new\nobject every render replays the entrance animation — use `useMemo` when the spec\ndepends on props\u002Fstate.\n\n## Shape data as a tidy table\n\nGraphein expects **long\u002Ftidy** data: one row per observation, one column per\nvariable. The *same* table drives every chart — point different channels at\ncolumns. To compare groups, add a `series` channel — **don't pre-pivot** into\none column per group.\n\n```ts\n\u002F\u002F Good (tidy): one row per month × region\n[{ month: '2024-01', region: 'North', revenue: 4200 },\n { month: '2024-01', region: 'South', revenue: 3100 }]\n\u002F\u002F encoding: x=month, y=revenue, series=region  → multi-series line\u002Fbar\n```\n\nRows are plain JSON — no functions, no DOM nodes, no `Date` objects. For time\naxes, pass ISO strings (`\"2024-01\"`, `\"2024-01-15\"`) or epoch ms and set\n`type: \"temporal\"`.\n\n## Encoding & field definitions\n\nCartesian charts (`line`\u002F`area`\u002F`bar`\u002F`scatter`) plus `pie`\u002F`heatmap`\u002F`funnel`\u002F\n`treemap`\u002F`waterfall`\u002F`calendarHeatmap`\u002F`dumbbell`\u002F`slope`\u002F`combo` map columns\nonto channels via `encoding`:\n\n| Channel | Used by | Purpose |\n| --- | --- | --- |\n| `x` | line, area, bar, scatter, heatmap, histogram, combo, slope, calendarHeatmap | Horizontal position \u002F bin field |\n| `y` | line, area, bar, scatter, heatmap, slope | Vertical position |\n| `series` | line, area, bar, slope | Split into multiple series |\n| `size` | scatter | Bubble radius |\n| `color` | heatmap, pie, treemap, calendarHeatmap | Continuous color or category |\n| `theta` | pie | Slice value |\n| `stage` \u002F `value` | funnel, waterfall | Ordered stage \u002F stage value |\n| `category` \u002F `value` \u002F `group` | treemap, dumbbell | Leaf identity \u002F measure \u002F parent |\n| `date` | calendarHeatmap | Date field → one cell per day |\n\n**`FieldDef`** = `{ field, type?, aggregate?, title?, format?, scale? }`:\n\n- `field` (**required**) — column name; dotted paths (`a.b`) read nested values.\n- `type` — `quantitative | temporal | ordinal | nominal` (inferred when omitted;\n  set it explicitly for time axes and to avoid surprises).\n- `format` — a [format hint](#value-formatting) for labels \u002F ticks \u002F tooltips.\n- `aggregate` — `sum | mean | avg | min | max | count | countDistinct | median |\n  first | last` when grouping.\n\n`gauge` and `bullet` use a top-level `value: { field }` instead of `encoding`.\n\n## Chart-type catalog\n\nPick the closest type; there is no custom-chart escape hatch — re-express exotic\nshapes with the nearest supported type.\n\n- **line \u002F area** — `x`, `y`, optional `series`. line: `points?`, `area?`,\n  `curve?`. area: `stack?` (totals). `curve`: `linear|monotone|step|stepBefore|\n  stepAfter|catmullRom`.\n- **bar** — `x`, `y`, optional `series`. `stack?` (else side-by-side groups),\n  `cornerRadius?`, `orientation?: 'vertical'|'horizontal'` (horizontal swaps\n  axes; keep `x`=category, `y`=value). For top-N, sort rows by value.\n- **scatter** — `x`, `y`, optional `size` (bubbles), `series` (colored groups).\n- **pie \u002F donut** — `theta` (value) + `color` (category). `donut?: true | 0..1`\n  inner-radius ratio. `labels?`.\n- **heatmap** — `x`, `y` (categories) + `color` (measure). `scheme?:\n  blues|teal|viridis|magma|greys`.\n- **histogram** — `x` (the numeric measure); auto-bins. `bin?: { maxbins?, step? }`.\n- **combo (dual-axis)** — shared `x` + `layers: [{ mark:'bar'|'line'|'area',\n  axis:'left'|'right', encoding:{ y } }]` for measures on independent scales.\n- **funnel** — `stage` + `value`. `percent?: 'first'|'previous'`, `labels?`.\n- **treemap** — `category` + `value`, optional `group` + `color`.\n- **waterfall** — `stage` + `value` (signed). `totals?: string[]`.\n- **gauge \u002F bullet** — top-level `value: { field }`. gauge: `min?`, `max?`.\n  bullet: `target?: { field }` + `encoding.label`.\n- **calendarHeatmap** — `date` + `color`. `scheme?`.\n- **slope** — `x` (two values), `y`, `series`.\n- **dumbbell** — `category` + `value` + `group` (2+ points per category).\n- **table** — `columns: TableColumn[]` (`field, title, format, align, width,\n  sortable, conditionalFormat, total, …`), `totals?`, `density?`.\n- **matrix (pivot)** — `rows`, `columns`, `values: [{ field, op, label?, format?,\n  conditionalFormat?, showAs? }]`, `subtotals?`, `grandTotals?`.\n- **box \u002F sankey \u002F choropleth** — distributions \u002F flows (`source`+`target`+\n  `value`) \u002F geography (`geo` + `key` + `color`). Rare; see the library docs.\n\n## In-spec features (declarative, on `BaseSpec`)\n\nReshape and enrich a spec without touching your data pipeline:\n\n- `transform: Transform[]` — `aggregate`, `bin`, `filter`, `fold`, `timeUnit`,\n  `calculate` run before the chart builds.\n- `annotations: Annotation[]` — reference lines\u002Fbands\u002Fzones + point callouts,\n  e.g. a target line: `annotations: [{ type: 'line', axis: 'y', value: 5000,\n  label: 'Target' }]`.\n- `insights: true` — auto-mark the max & min (opt into `outliers`).\n- `trendline: true` — linear line of best fit (line\u002Fscatter).\n- `facet: { field, columns? }` — small-multiples trellis, one panel per category.\n- `title`, `legend`, `tooltip`, `axes`, `animation`, `description` (a11y).\n\n## Value formatting\n\nFormat inside the spec (never pre-format numbers to strings). A subset of\nd3-format for numbers, strftime for dates:\n\n| Hint | Input → Output |\n| --- | --- |\n| `,d` | `1234567` → `1,234,567` |\n| `.1f` | `3.14159` → `3.1` |\n| `.0%` | `0.42` → `42%` |\n| `$,.0f` | `5230` → `$5,230` |\n| `.2s` | `1234567` → `1.2M` |\n\nDates: any hint with `%` is a date pattern — `%b %e, %Y` → `Jan 2, 2024`\n(`%Y`\u002F`%y` year, `%m` month, `%d`\u002F`%e` day, `%B`\u002F`%b` month name, `%H:%M` time).\n\n## Theming\n\nThis template has no design-token system, so charts render with **Graphein's\nbuilt-in theme** (teal accent, slate neutrals, a 10-hue categorical palette) and\nit is dark-mode aware. To recolor, set `spec.theme` (a `ThemeInput`) — e.g.\n`theme: { colors: { accent: '#7c3aed' } }` — or pass a palette. Keep colors in\nthe spec; don't hand-paint marks.\n\n## Interactivity (cross-chart selections)\n\nCharts can publish\u002Fconsume named selections. Create one shared bus and pass the\n**same** `store` to several `\u003CChart>`s to cross-highlight \u002F cross-filter:\n\n```tsx\nimport { useMemo } from 'react';\nimport { createSelectionStore } from 'graphein';\nimport { Chart } from '@\u002Fcomponents\u002FChart';\n\nconst store = useMemo(() => createSelectionStore(), []);\n\n\u002F\u002F Publisher: clicking a bar sets the \"pick\" selection\n\u003CChart store={store} spec={{ type: 'bar', data: rows,\n  params: [{ name: 'pick', select: { type: 'point', fields: ['region'] } }],\n  encoding: { x: { field: 'region' }, y: { field: 'revenue' } } }} \u002F>\n\n\u002F\u002F Consumer: dims non-matching rows when \"pick\" changes\n\u003CChart store={store} spec={{ type: 'line', data: rows, highlight: { param: 'pick' },\n  encoding: { x: { field: 'month', type: 'temporal' },\n              y: { field: 'revenue' }, series: { field: 'region' } } }} \u002F>\n```\n\n`filter` clauses (`{ param }`, `{ field, equals|oneOf|range|contains }`) subset\nrows. Observe changes via `\u003CChart onSelectionChange={(name, value) => …} \u002F>`.\n\n## Validate & self-check\n\nBefore shipping a spec, sanity-check it:\n\n```ts\nimport { validateSpec } from 'graphein';\nconst { valid, errors, warnings } = validateSpec(spec);\n```\n\nCommon failures `validateSpec` catches:\n\n- **Missing `encoding`** for the type (`line`\u002F`area`\u002F`bar`\u002F`scatter` need `x`+`y`;\n  `pie` needs `theta`+`color`; `heatmap` needs `x`+`y`+`color`; `funnel` needs\n  `stage`+`value`).\n- **A `field` that doesn't exist** in the data rows (a typo silently drops the\n  channel).\n- **Pre-pivoted \u002F wide data** — pass tidy rows and split with `series`.\n\nEmpty `data` renders an empty chart — show a real empty\u002Floading state in the UI\nrather than shipping placeholder rows.\n\n## Gotchas\n\n- Render through `\u003CChart>`, not `render()` — the binding handles mount\u002Fupdate\u002F\n  teardown and is StrictMode-safe.\n- Give the chart's parent an explicit height, or it collapses to nothing.\n- Memoize specs built from props\u002Fstate so they don't re-animate every render.\n- No custom-chart escape hatch — re-express with the closest supported type.\n- Everything is plain JSON: no functions, no DOM nodes, no `Date` objects.\n",{"name":5,"description":7},"main","6007598ad84bc06f9d584f0d2ba6af970422a9fe","templates\u002Funiversal-app\u002F.agents\u002Fskills\u002Fgraphein-visuals",70,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fawesome-rayfin","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 07:42:02",{"source":9,"skillName":5,"commands":69,"prompt":79,"zipAvailable":80},[70,73,76],{"tool":71,"command":72},"npx","npx skills add microsoft\u002Fawesome-rayfin --skill graphein-visuals",{"tool":74,"command":75},"bunx","bunx skills add microsoft\u002Fawesome-rayfin --skill graphein-visuals",{"tool":77,"command":78},"pnpm","pnpm dlx skills add microsoft\u002Fawesome-rayfin --skill graphein-visuals","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fawesome-rayfin\u002Fblob\u002Fmain\u002Ftemplates\u002Funiversal-app\u002F.agents\u002Fskills\u002Fgraphein-visuals\u002FSKILL.md",true,[],[83,105,129,153,177,198],{"skillNo":84,"name":31,"nameZh":17,"description":85,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":54},"01M70HMXK23DA6CE0T9R4DNDA9","Use when user wants to incorporate charts, graphs, data grid,  or other visual representations of data into their project. Use VegaVisual and DataGrid components to create these visuals,  utilizing the shared DataTable input, formatting, theme, and interactivity. Covers the onInteraction selection\u002Fclick events host apps consume, named multi-table data input for layered overlays and reference lines, and Vega-Lite native selections.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fawesome-rayfin\u002Fblob\u002Fmain\u002Ftemplates\u002Fcaldova-reorder\u002F.agents\u002Fskills\u002Fvisuals\u002FSKILL.md",[],[31,89,90,91,46,92,93,94,95,96,97,98,34,99,51,100,101,102,103,104],"shared","click","theme","for","overlays","project","selection","host","use","apps","visual","grid","multi","create","layered","native",{"skillNo":106,"name":107,"nameZh":17,"description":108,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":54},"01M70HMVE4BANY7VVP0JR2GQ92","schema-discovery","Explore Power BI semantic model schemas using DAX INFO functions. Progressive metadata discovery strategy, scope estimation, and narrowing techniques for tables, columns, measures, and relationships.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fawesome-rayfin\u002Fblob\u002Fmain\u002Ftemplates\u002Fcaldova-reorder\u002F.agents\u002Fskills\u002Fschema-discovery\u002FSKILL.md",[],[112,113,114,115,116,44,92,117,118,119,120,121,122,123,124,125,38,126,127,128],"discovery","schema discovery","schema","power","scope","explore","techniques","strategy","estimation","power bi","functions","info","bi","relationships","dax","tables","semantic",{"skillNo":130,"name":131,"nameZh":17,"description":132,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":54},"01M70HMQD0PKCKWCY2NQ8VCCYH","rayfin","Use when doing ANY task involving Rayfin — scaffolding, data models, decorators, auth, deployment, CLI commands, or client setup. Triggers: rayfin, rayfin init, rayfin up, rayfin login, RayfinClient, @entity, @role, @anonymous, @authenticated, @text, @uuid, @int, @decimal, @boolean, @date, @email, @set, @one, @many, DAB, Data API Builder, rayfin.yml, publishableKey, signUp, signIn, signOut, sendMagicLink, handleMagicLinkCallback, ensureSignedInWithFabric, Fabric SSO, Entra ID, rayfin up db apply, rayfin up staticapp deploy, schema.ts, OpaqueSession, onSessionChange, GraphQL select, GraphQL create, GraphQL update, GraphQL delete, findById, executePaginated, RLS policy, row-level security, claims.sub, claims.email, TC39 decorators, config generation, dialect, mssql, postgresql","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fawesome-rayfin\u002Fblob\u002Fmain\u002Ftemplates\u002Fcaldova-reorder\u002F.agents\u002Fskills\u002Frayfin\u002FSKILL.md",[],[131,136,137,138,139,140,141,142,143,144,145,146,147,34,148,149,150,151,152,102],"builder","SET","decorators","anonymous","auth","db","scaffolding","select","up","init","entra id","api builder","rls","api","text","mssql","postgresql",{"skillNo":154,"name":155,"nameZh":17,"description":156,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":54},"01M70HMFPA9WXWY5X7C14XB11D","rayfin-connectors","Use for Rayfin connectors that wire existing Fabric SQL data sources (Lakehouse, Warehouse, SQL Database) into an app as GraphQL-backed entities. Triggers: rayfin connector, rayfin up connector apply, connectors:, fabric-sqlanalytics, fabric-warehouse, fabric-sqldatabase, kusto, kql, eventhouse, workspaceId, itemId, operations:, AppConnectorsSchema, ConnectorsSchema, rayfin\u002Fconnectors\u002F, metadata.json, connector @role policy, connector claims.sub filter, connector claims.email filter, ConnectorsRayfinClient, rayfin-client.ts, client.connectors, connectorConfig, GraphQLBackedConnector, RestrictedDataApi, schema.ts aggregate, generate entities from metadata, add a use case on specific entities, wire connector into client, call a connector from the SDK, rayfin connector inspect, inspect connector data, sample connector rows, fabric-semanticmodel, --entity, --query, DAX EVALUATE, read-only sample query, rayfin connector search, discover connectable sources, find fabric sources to add, --all-workspaces, --workspace-id, connector search interactive picker, rayfin connector invoke, invoke a connector operation, run executeQuery, --input, --file, RAYFIN_FEATURE_FLAGS, resultSetRowCountLimit, limit rows, row limit, cap rows, too many rows, overflow","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fawesome-rayfin\u002Fblob\u002Fmain\u002Ftemplates\u002Fcaldova-reorder\u002F.agents\u002Fskills\u002Frayfin-connectors\u002FSKILL.md",[],[160,131,161,43,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,92],"rayfin connectors","connectors","inspect","workspaces","search","invoke","filter","cap","generate","data sources","run","read","input","as","kql","limit","email",{"skillNo":178,"name":179,"nameZh":17,"description":180,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":54},"01M70HMD71TMHM9NEZV0870V9B","query-design","Separates DAX data-fetching from TypeScript presentation. Guides when to use  DAX vs. TypeScript vs. Vega-Lite for aggregation, total rows, FORMAT(), SELECTCOLUMNS,  BLANK handling, filtering, multi-grain queries, cross-filtering and cross-highlight subset\u002Foverlay queries, and format strings.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fawesome-rayfin\u002Fblob\u002Fmain\u002Ftemplates\u002Fcaldova-reorder\u002F.agents\u002Fskills\u002Fquery-design\u002FSKILL.md",[],[184,185,186,187,92,188,189,97,34,190,101,191,192,193,194,195,196,47,197,126],"query design","design","query","overlay","strings","filtering","guides","queries","grain","aggregation","format","typescript","data-fetching","when to use",{"skillNo":199,"name":200,"nameZh":17,"description":201,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":202,"categories":203,"keywords":204,"publishedAt":54},"01M70HMAX3MRJWF62P8PAYF1R3","playwright-cli","Automate browser interactions, test web pages and work with Playwright tests.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fawesome-rayfin\u002Fblob\u002Fmain\u002Ftemplates\u002Fcaldova-reorder\u002F.agents\u002Fskills\u002Fplaywright-cli\u002FSKILL.md",[],[205,206,207,200,208,209,71,210,211,212,213,214,215,216,217,218],"playwright cli","playwright","cli","pages","tests","Bash","browser","with","test","work","web","test web","npm","automate"]