Logo: Developing Chart Types Locally

Developing Chart Types Locally

OrganisatiounBeléift
lightdash
developing-chart-types-locally

Benotzt dëse Skill, wann Dir e lokal erstallten oder erofgeluedene personaliséierte Lightdash-Chart-Typ (data_app_viz) ännert — de Kontrakt, datt vizSchema a Component zesummepassen, den Upload-a-Verifizéierungsprozess, d'Virschau mat lokale Fixtures a wéi e Chart-Typ an den offizielle Registry kënnt.

Add to TypingMind

Iwwersiicht

Editeurlightdash
Repositorylightdash
Skill-Nummdeveloping-chart-types-locally
Stären
6.1K
Forks
778
Matgeliwwert Dateien
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    lightdash huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Developing Chart Types Locally an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/lightdash/lightdash/tree/main/packages/cli/src/handlers/apps/authoring/developing-chart-types-locally
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lightdash/lightdash.git /tmp/lightdash
mkdir -p .claude/skills
cp -r /tmp/lightdash/packages/cli/src/handlers/apps/authoring/developing-chart-types-locally .claude/skills/developing-chart-types-locally
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Developing Chart Types Locally an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Developing Chart Types Locally automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Developing Chart Types Locally net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Developing Lightdash Custom Chart Types Locally

You are editing a Lightdash custom chart type (a reusable visualization, the data_app_viz template) that was created or downloaded with the Lightdash CLI. It is ONE chart component that Lightdash hands data and settings to — not a data app.

The contract is the reusable-visualization skill

Read .claude/skills/reusable-visualization before editing. It defines everything the component may do: useVizContext() is the only channel to the host (data, options, resolved colours), the component runs no query, owns no explore, and never fetches anything itself. App-level SDK APIs (query builder, useLightdash, filters, externalFetch) do not apply here and must not be introduced.

The declaration lives in lightdash-app.yml — keep it in lockstep

In the in-product builder the declaration is emitted by the generation run; locally it is the vizSchema block in this folder's lightdash-app.yml, and upload round-trips it to the server (without it the chart type never appears in the explorer's chart type picker).

The correspondence must be exact in both directions: every key the component reads from fieldMapping or options is declared in vizSchema, and everything declared there is read by the component. When an edit changes what the component reads — a new field, a renamed option, a removed control — update vizSchema in the same edit. A declared option nothing reads is a dead control; a read key nothing declares never receives a value.

The edit → validate → upload → verify loop

Run these commands from this folder under chart-types/<slug>/. The upload path ../.. selects the Lightdash content root.

  1. Edit files under src/ (and vizSchema when the declaration changes).
  2. lightdash apps validate checks source and manifest (including that vizSchema parses); lightdash apps validate --build adds the Cloud-parity Vite production build. A build failure is a validation error with the Vite output.
  3. lightdash upload --chart-types <slug> --path ../.. (the slug from lightdash-app.yml) — the server rebuilds and serves it.
  4. Verify in Lightdash: open any explore, run a query with at least the required fields' shapes (e.g. a dimension and a metric), pick this chart type in the chart type picker, and map its fields. Check every config option you declared actually changes the chart.

Saved charts already using this chart type may pin a version; unpinned charts move to the newly uploaded version right away. While iterating in a shared project, prefer verifying on a throwaway chart.

Preview locally with a fixture (fast layout iteration)

useVizContext() normally waits for the Lightdash host to push a context, so with no host the component renders nothing. For local iteration the SDK has a dev-only fixture fallback: when the app runs top-level (not embedded) and the page URL carries ?vizFixture=<path>, it fetches that same-origin JSON file and feeds it to useVizContext() as the context.

The scaffold ships a viz-fixture.json at the folder root. To use it:

  1. lightdash apps preview (or npm run dev) to start the dev server.
  2. Open the dev URL with the param, e.g. http://localhost:5173/?vizFixture=/viz-fixture.json. The chart renders from the fixture.
  3. Edit viz-fixture.json to match your declared vizSchema — fieldMapping (input name → string id, or an ordered array of ids for multiple-field inputs), rows (each cell is { "value": { "raw": ..., "formatted": "..." } }, keyed by those ids), options (declared option name → value), colorPalette, and pivotDetails (null unless you map a series field). Reload to see changes.

For multiple-field inputs, set multiple: true on the vizSchema.fields entry and iterate the array at useVizContext().fieldMapping[name] in its existing order, narrowing with Array.isArray first. Single-field inputs continue to read a string from fieldMapping[name]. Test three metrics and multiple dimensions, remove and re-add one, then save and reopen the chart in the explorer. Verify fields follow the order they were added, with re-added fields at the end. Keep the input names stable across upgrades. Single-field inputs retain string bindings; details and examples live in the reusable-visualization skill.

This is for layout and option iteration only, and never fires in production (an embedded viz has a real host whose context always wins, and the param must be explicitly present). The fixture is fake data you hand-maintain: colors fall back to the palette (no model or shared-dashboard colors), pivotDetails must be shaped by hand, and formatting is whatever you type. The explorer with real data remains the source of truth for correctness — still run the upload → verify loop above before finishing, and verify every declared option actually changes the chart there.

Dependencies: template-deps-only, strictly

Build with the template's preinstalled set (see package.json — React, Recharts, d3 and friends). Do not add npm packages and do not vendor library source into src/. This is stricter than for data apps: the official chart registry rejects any dependency drift from its template, so a chart type that grows custom dependencies becomes unpublishable.

Root config files (vite.config.js, tsconfig.json, ...) are read-only reference — the server rebuilds against a trusted template. .npmrc sets ignore-scripts=true; never remove it or run installs with scripts enabled.

Publishing to the official registry

Once the chart type works in an instance, it can be proposed for the official chart registry (the lightdash/lightdash-library repo, served to every Lightdash deployment with the chart type library enabled):

  1. Copy this folder into that repo under charts/<slug>/.
  2. Run node scripts/prepare-chart.mjs charts/<slug> there — it prunes the local scaffold (these skills, configs, AGENTS/README), scrubs instance-side manifest fields, and shapes the folder for the registry. The folder name becomes the permanent official registry slug; pass --slug <official-slug> if the local slug isn't the identity that should ship.
  3. Add real screenshots from the in-product preview under screenshots/ (the first is the gallery thumbnail) and fill in registry.yml (version, tags, changelog). New versions default to the beta channel; releasing to customers requires an explicit channel: stable.
  4. Open a PR there. On merge, publishing is automatic; published versions are immutable — any later change needs a version bump.

Report the registry step as a suggestion to the user rather than doing it unprompted: publishing makes the chart type public.

Heefeg gestallte Froen

Wat mécht de KI-Skill Developing Chart Types Locally?

Benotzt dëse Skill, wann Dir e lokal erstallten oder erofgeluedene personaliséierte Lightdash-Chart-Typ (data_app_viz) ännert — de Kontrakt, datt vizSchema a Component zesummepassen, den Upload-a-Verifizéierungsprozess, d'Virschau mat lokale Fixtures a wéi e Chart-Typ an den offizielle Registry kënnt.

Firwat Developing Chart Types Locally op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Developing Chart Types Locally besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Developing Chart Types Locally an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/lightdash/lightdash/tree/main/packages/cli/src/handlers/apps/authoring/developing-chart-types-locally an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Developing Chart Types Locally benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Developing Chart Types Locally benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Developing Chart Types Locally domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Developing Chart Types Locally gratis?

lightdash huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇