Skip to content
Back to skills

Svelte Layerchart

ASecurity

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.

  • 94 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 7, 2026
developmentbash

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 4 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add spences10/svelte-skills-kit --skill svelte-layerchart --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Svelte Layerchart?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Svelte Layerchart
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/spences10-svelte-layerchart/badge)](https://www.skillsdirectory.com/skills/spences10-svelte-layerchart)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.md1.4 KB
  • references/full-patterns.md7.4 KB
  • references/graph-patterns.md2.7 KB
  • references/tooltip-modes.md3.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.