agentsclimarketplace

Svelte layerchart

Skill spences10/skills/svelte-layerchart

Build Svelte LayerChart components. Use for tooltip snippets, Chart context access, gradients, highlights, axes, and Svelte 5 snippet patterns.From its SKILL.md

Install
npx -y skills add spences10/skills --skill svelte-layerchart

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.5 KB, 330 tokens by cl100k_base, as published. Nobody here has run it

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: {#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

ModeUse Case
bandBar charts (scaleBand)
bisect-xTime-series area/line
quadtree-xArea (nearest x)
quadtreeScatter plots

References

What ships with it: 3 files

13.2 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.