Svelte layerchart

From spences10/skills · View interactive version

Svelte layerchart is an AI agent skill from the GitHub repository spences10/skills. Build Svelte LayerChart components. Use for tooltip snippets, Chart context access, gradients, highlights, axes, and Svelte 5 snippet patterns.

How to use this skill

Skill file

Svelte LayerChart

Docs: layerchart.com

Install

npm i layerchart d3-scale

Quick Start

<Chart {data} x="date" y="value" tooltip={{ mode: 'bisect-x' }}>
	<Svg><Area class="fill-primary/20" /><Highlight points /></Svg>
	<Tooltip.Root>{#snippet children({ data })}{data.value}{/snippet}</Tooltip.Root>
</Chart>

Core Patterns

Tooltip Modes

| Mode | Use Case |

| ------------ | ---------------------- |

| band | Bar charts (scaleBand) |

| bisect-x | Time-series area/line |

| quadtree-x | Area (nearest x) |

| quadtree | Scatter plots |

References

Calendar

zoom/pan

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.