Back to skills
SKILL.md
Svelte Layerchart
ASecuritySvelte LayerChart patterns. Use for chart components with tooltip snippets, Chart context access, and all Svelte 5 snippet patterns for tooltips, gradients, highlights, and axes.
- 94 stars
- 0 votes
- 0 copies
- 3 views
- Added September 7, 2026
Security analysis
96/100- Installs packages at runtime which could introduce malicious dependencies
Pro scans all 4 files and shows the line behind each finding
npx -y skills add spences10/svelte-skills-kit --skill svelte-layerchart --agent claude-codeAre you the author of Svelte Layerchart?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/spences10-svelte-layerchart)---
name: svelte-layerchart
# prettier-ignore
description: "Svelte LayerChart patterns. Use for chart components with tooltip snippets, Chart context access, and all Svelte 5 snippet patterns for tooltips, gradients, highlights, and axes."
---
# Svelte LayerChart
Docs: **layerchart.com**
## Install
```bash
npm i layerchart d3-scale
```
## Quick Start
```svelte
<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**: `{#snippet children({ data })}` - NOT `let:data`
- **Chart context**: `{#snippet children({ context })}`
- **Gradient**: `{#snippet children({ gradient })}`
- **Enable tooltip**: `tooltip={{ mode: 'band' | 'bisect-x' }}`
- **Type data**: `{#snippet children({ data }: { data: MyType })}`
## Tooltip Modes
| Mode | Use Case |
| ------------ | ---------------------- |
| `band` | Bar charts (scaleBand) |
| `bisect-x` | Time-series area/line |
| `quadtree-x` | Area (nearest x) |
| `quadtree` | Scatter plots |
## References
- [full-patterns.md](references/full-patterns.md) - Area, Bar, Pie,
Calendar
- [tooltip-modes.md](references/tooltip-modes.md) - All modes
- [graph-patterns.md](references/graph-patterns.md) - ForceGraph,
zoom/pan
Files in this skill
- SKILL.md
- references/full-patterns.md
- references/graph-patterns.md
- references/tooltip-modes.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.