developing-chart-types-locally
Was er macht
Dieser Skill leitet die Bearbeitung eines eigenen Diagrammtyps, der mit der Lightdash-CLI erstellt oder heruntergeladen wurde. Er ist für Entwickler gedacht, die eigene visuelle Komponenten für Lightdash bauen.
Wann du ihn nutzt
- ✓Wenn du einen eigenen Diagrammtyp bearbeiten willst, den du mit der Lightdash-CLI erstellt hast.
- ✓Wenn du einen Diagrammtyp hochladen und prüfen musst, ob er funktioniert.
- ✓Wenn du einen Diagrammtyp lokal mit Beispieldaten in der Vorschau sehen willst.
Link zum Skill
https://github.com/lightdash/lightdash/blob/main/packages/cli/src/handlers/apps/authoring/developing-chart-types-locally/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Bearbeite meinen eigenen Blasendiagramm-Typ so, dass die Legende rechts steht, lade ihn dann hoch und prüfe, ob er funktioniert.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill erklärt die Regeln, denen eine Diagrammkomponente folgen muss, etwa dass sie ihre Daten nur vom Host bezieht. Danach führt er durch Hochladen, Prüfung und die lokale Vorschau mit Testdaten.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
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 the reusable-visualization skill before editing. It defines everything the component may do: useVizContext() is the only channel to the host for data, options and resolved colours; the component runs no query and owns no explore. App-level query APIs (query builder, useLightdash, filters) do not apply here and must not be introduced.
Never hand-build a data-point action menu when useVizContext().pointMenu.enabled — call pointMenu.open({ x, y, row, metric }) and let Lightdash render it; an in-viz menu is only the fallback for hosts that predate the capability.
External HTTP APIs go through linked connections
A chart type's rows always come from useVizContext(). Anything else it needs from outside Lightdash, such as reference data from a third-party API or images from a URL, goes through an external connection, the same way it does for data apps.
- The one sanctioned path to a third-party API is
client.externalFetch('<alias>', ...), with the client fromuseLightdashClient(), against an external connection a project admin configured and linked to this chart type. Do not add directfetchor REST calls; the sandbox blocks them. - Images load only from a linked connection that has public images enabled, from its exact origin. Never put Lightdash data in an image URL.
- Links are declared in this folder's
lightdash-app.ymlunderexternalConnections(- alias: stripe/connectionSlug: stripe-api). When the key is present, upload reconciles the chart type's links to match it exactly, so to link a connection that already exists in the project, add its{alias, connectionSlug}entry and upload. Do not remove entries casually: an entry removed from the list (or an empty list) unlinks on upload, and a manifest without the key leaves links unchanged. - Watch the upload output: a
connectionSlugthat doesn't exist in the target project is skipped with a warning (the chart type uploads, butexternalFetchon that alias fails at runtime). If a link is skipped or forbidden, report it to the user instead of retrying. - If the chart type needs an API with no existing connection, stop and say so. An admin must create the connection first; then it can be linked via the manifest as above.
- Connections are not emulated by the local fixture preview. Test them after upload, in the explorer.
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.
- Edit files under
src/(andvizSchemawhen the declaration changes). lightdash apps validatechecks source and manifest (including thatvizSchemaparses);lightdash apps validate --buildadds the Cloud-parity Vite production build. A build failure is a validation error with the Vite output.lightdash upload --chart-types <slug> --path ../..(theslugfromlightdash-app.yml) — the server rebuilds and serves it.- 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. W
Häufige Fragen
Kann ein Diagrammtyp seine eigene Abfrage ausführen?
Nein, der Skill sagt, dass ein Diagrammtyp seine Daten von Lightdash bekommt und keine eigene Abfrage ausführt.
Wie kann ich es in der Vorschau sehen?
Der Skill beschreibt eine lokale Vorschau mit Beispiel-Fixture-Daten.
Was ist mit externen APIs?
Externe Anfragen laufen über eine verknüpfte Verbindung, die ein Admin im Projekt einrichtet.
Details
Originalbeschreibung des Autors
Use when editing a locally created or downloaded Lightdash custom chart type (data_app_viz) — the vizSchema/component lockstep contract, the upload-and-verify loop, the local fixture preview, and how a chart type reaches the official registry.
repo: lightdash/lightdash
Beliebtheit
- GitHub-Sterne
- 6.2k
- Platz im Ranking
- #14402
- Lizenz
- —
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
breakup-pr
6.2kHilft deinem Agenten, einen großen Pull Request in kleinere, gestapelte Teile zu zerlegen, die einzeln geprüft und zusammengeführt werden können.
lightdash-agent-slack-messaging
6.2kHilft deinem Agenten, klare und freundliche Wartungs- und Aktivitätsberichte für Lightdash-Administratoren zu schreiben, nur auf Basis der vorhandenen Belege.
developing-in-lightdash
6.2kHilft deinem Agenten, Lightdash-Dashboards und -Diagramme als JSON zu lesen, zu erstellen und zu bearbeiten, einschließlich der Einstellungen jedes Diagrammtyps.
filter-expressions
6.2kHilft deinem Agenten, korrekte Filterausdrücke für Lightdash-Metrikabfragen zu schreiben, auch für Filter auf eigene Kennzahlen.
Ähnliche Skills
angular-developer
280kHilft deinem Agenten bei Angular-Code und gibt Tipps zur Projektstruktur. Nützlich für neue Projekte, einzelne Code-Teile sowie Performance und Barrierefreiheit.
frontend-a11y
280kHilft deinem Agenten, Weboberflächen für alle zugänglich zu machen. Sorgt dafür, dass Websites und Apps gut mit Screenreadern und Tastaturnavigation funktionieren.
frontend-patterns
280kLässt deinen Agenten moderne Muster in der Frontend-Entwicklung anwenden. Optimiert Performance, verwaltet State und folgt Best Practices für React und Next.js.