visuals
Skill10 starsChanged 32 days agoMITView on GitHub
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 VisualContainer chrome every visual gets by default, the onInteraction selection/click events host apps consume, named multi-table data input for layered overlays and reference lines, and Vega-Lite native selections.
15 other projects use a version of this, 6 of them edited.
Adopted by
Most recently taken up by
- microsoft/DataHub-App-for-Microsoft-Copilot-Agents-Cowork-and-Autopilotsword for word, first seen Nov 8, 2026
- microsoft/fabric-apps-analytic-templatesedited, first seen Nov 3, 2026
- microsoft/ValueLens-for-Microsoft-Copilotword for word, first seen Oct 25, 2026
- microsoft/ConsumptionCentral-for-Microsoft-Copilotword for word, first seen Oct 25, 2026
- MichaelPrutkow/anki-for-claudetheir own version, first seen Oct 17, 2026
- microsoft/frontiertour27-LTG291-turn-your-data-into-production-apps-with-rayfinedited, first seen Oct 17, 2026
Used with
Projects with it also use rayfin-connectors and rayfin-functions.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillrayfin-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/connectors/, 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
Also in 3 projects that use this
MicrosoftSkillrayfin-functions
Use when writing Rayfin user-defined functions (UDFs), invoking functions from frontend code, or using functions CLI commands. Triggers: rayfin functions, udf.func, UserDataFunctions, RayfinContext, FabricContext, AppFunctionsSchema, functions init, dev functions apply, client.functions, invoke, func start, function_app.ts, types.ts, rayfin/functions/, FunctionClient, FunctionsSchema, fabric-user-data-functions, functionsBaseUrl, VITE_RAYFIN_FUNCTIONS_URL, bootstrap.ts, rayfinClient.ts
Also in 3 projects that use this
Other versions15 projects use a version of this.
Word for word · 3
Edited · 6
- microsoft/rayfin★ 64686% same
- microsoft/fabric-apps-analytic-templates★ 2970% same
- microsoft/aitour27-LTG291-turn-your-data-into-production-apps-with-rayfin★ 292% same
- microsoft/frontiertour27-LTG291-turn-your-data-into-production-apps-with-rayfin★ 292% same
- microsoft/aitour27-BRK390-building-ai-applications-with-microsoft-databases-and-fabric★ 192% same
- microsoft/frontiertour27-BRK390-building-ai-applications-with-microsoft-databases-and-fabric★ 192% same
Wrote their own version · 6
- microsoft/awesome-rayfin★ 108same name
- renatoworks/strudel-claude★ 61same name
- anthonymaley/Kerd★ 3same name
- MichaelPrutkow/anki-for-claude★ 3same name
- MichaelPrutkow/anki-mcp-server★ 3same name
- dominionism/Playbook★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- app/AGENTS.mdAGENTS.md
- app-designSkill
- app-validationSkill
- dax-authoringSkill
- fabric-cliSkill
- fabric-sdkSkill
- playwright-cliSkill
- query-designSkill
- schema-discoverySkill
The file
Files
Visuals
Types of visuals
There are 2 different types of visuals that can be used in a project:
- Charts and Graphs: These are used to represent data in a visual format, such as bar charts, line charts, pie charts, etc. These are built using vega-lite, see references/vega-lite-visual.md for more details.
- Data Grids: These are used to display tabular data in a structured format, allowing for sorting, filtering, and pagination. See references/data-grid-visual.md for more details.
Packages & Imports
The visual components are provided by three packages. Always use these package imports when creating visuals.
| Package | Primary exports | Example import |
@microsoft/fabric-visuals | VegaVisual, types: VisualizationSpec, VegaLiteConfig, VegaVisualProps | import { VegaVisual } from "@microsoft/fabric-visuals" |
@microsoft/fabric-datagrid | DataGrid, types: GridColumnDef, Row, CellValue, DataGridProps, DataGridTheme, SortConfig | import { DataGrid } from "@microsoft/fabric-datagrid" |
@microsoft/fabric-visuals-core | isDataTable, convertDataTableToRows, design tokens | import { isDataTable } from "@microsoft/fabric-visuals-core" |
The DataTable type (used by both components) is defined in @microsoft/fabric-visuals-core and re-exported by the visual packages' type definitions.
Data Format
The chart and data grid components share a unified data prop of type DataTable (from @microsoft/fabric-visuals-core). This structured format carries column metadata (displayName, format, semanticType) that the components use for axis titles, grid headers, number formatting, and tooltips.
Using DataTable: Pass a DataTable via the data prop. The visual uses its column metadata for formatting, axis titles, and tooltips.
Static/inline data: For static data, transformed data, or plain arrays, put data: { values: [...] } directly in the Vega-Lite spec and omit the data prop.
Multiple tables in one visual: the data prop also accepts a Record<string, DataTable> for specs that bind separate layers to more than one dataset by name such as layered overlays, reference lines, and axis spines. See references/multi-data-input.md.
import { useThemeContext } from "@/hooks/theme.context";
import { VegaVisual } from "@microsoft/fabric-visuals";
import { DataGrid } from "@microsoft/fabric-datagrid";
import type { DataTable } from "@microsoft/fabric-visuals-core";
const { theme } = useThemeContext();
// Charts — pass a DataTable and Vega-Lite spec
<VegaVisual spec={vegaLiteSpec} data={dataTable} theme={theme} />
// Grids — displayName becomes column headers, format applies to cells
<DataGrid data={dataTable} theme={theme} />
// Static/inline data — no data prop needed
const inlineSpec = {
data: { values: [{ x: 1, y: 2 }, { x: 3, y: 4 }] },
mark: "point",
encoding: { ... },
};
<VegaVisual spec={inlineSpec} theme={theme} />For the DataTable schema and ColumnDef fields, see references/data-table.md.
VisualContainer defaults for every visual
VegaVisual and DataGrid wrap themselves in a VisualContainer by default. The container draws the chrome — border, padding, header (title/subtitle) — plus its built-in actions, all enabled by default. Do not add a wrapper of your own unless absolutely required.
<VegaVisual
spec={vegaLiteSpec}
data={dataTable}
theme={theme}
header={{ title: "Revenue by Region", subtitle: "Last 12 months" }}
/>
<DataGrid data={dataTable} theme={theme} header={{ title: "Top Products" }} />Anything the default container doesn't cover — custom actions, programmatic capture, the same chrome around a non-visual etc: references/visual-container.md.
Formatting & Theme
- Formatting rules: Number formatting, color palettes, chart-specific encoding rules, highlighting guidelines, and a default theme. See references/formatting.md.
Custom visuals
Always use the above mentioned ways to create visual when possible. If the user's request doesn't allow creation using the above methods, ask the user if they are ok with using another library for creating the visual. If they are ok with it, use the library to create the visual. If they are not ok with it, then build that visual from scratch using HTML, CSS, and JS/TS. Make sure to ask the user for any specific requirements they have for the visual, such as colors, labels, etc.
Interactivity
Both VegaVisual and DataGrid expose an onInteraction prop that emits structured, predicate-based events when the user clicks a data point or row.
Always use the onInteraction prop on VegaVisual and DataGrid to surface user selections. The component only emits the selection; the host app decides what it does — e.g. coordinating other visuals or queries on the page.
A visual renders a layered subset by binding two named datasets to two layers (
data={{ all, highlighted }}) — see references/multi-data-input.md. The component renders whatever tables it is handed.
import type { InteractionEvent } from "@microsoft/fabric-visuals-core";
function handleInteraction(source: string, events: InteractionEvent[]) {
for (const event of events) {
if (event.action === "select") {
// event.selections describes the clicked data as predicates
} else if (event.action === "clear") {
// user deselected (re-clicked same item or clicked empty space)
}
}
}
<VegaVisual spec={spec} data={dataTable} theme={theme}
onInteraction={(events) => handleInteraction("salesChart", events)} />
<DataGrid data={dataTable} theme={theme}
onInteraction={(events) => handleInteraction("detailTable", events)} />Key concepts:
- Clicking a different data point emits a new
select(replaces the prior selection — no precedingclear). - Re-clicking the same item or background space in a vega-lite visual emits
clear. - Predicates include all fields from the datum; consumers filter to the ones that are relevant to them.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

