
## Usage

```svelte
<EvilLineChart xDataKey="month" {data} {chartConfig} backgroundVariant="dots" />
```

## Variants

### Dots

### backgroundVariant='dots'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="dots" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

### Grid

### backgroundVariant='grid'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="grid" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

### Cross Hatch

### backgroundVariant='cross-hatch'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="cross-hatch" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

### Diagonal Lines

### backgroundVariant='diagonal-lines'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="diagonal-lines" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

### Plus

### backgroundVariant='plus'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="plus" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

### Falling Triangles

### backgroundVariant='falling-triangles'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="falling-triangles" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

### 4-Pointed Star

### backgroundVariant='4-pointed-star'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="4-pointed-star" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

### Tiny Checkers

### backgroundVariant='tiny-checkers'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="tiny-checkers" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

### Overlapping Circles

### backgroundVariant='overlapping-circles'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="overlapping-circles" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

### Wiggle Lines

### backgroundVariant='wiggle-lines'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="wiggle-lines" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

### Bubbles

### backgroundVariant='bubbles'

```svelte
<script lang="ts">
	import { EvilLineChart } from '$lib/components/evilcharts/charts/layerchart-line-chart/index.js';
	import { type ChartConfig } from '$lib/components/evilcharts/ui/layerchart-chart/index.js';
	import { ChartBackground } from '$lib/components/evilcharts/ui/layerchart-background/index.js';

	const data = [
		{ month: 'January', desktop: 342, mobile: 184 },
		{ month: 'February', desktop: 876, mobile: 491 },
		{ month: 'March', desktop: 512, mobile: 290 },
		{ month: 'April', desktop: 629, mobile: 391 },
		{ month: 'May', desktop: 458, mobile: 309 },
		{ month: 'June', desktop: 781, mobile: 449 },
		{ month: 'July', desktop: 394, mobile: 234 },
		{ month: 'August', desktop: 925, mobile: 557 },
		{ month: 'September', desktop: 647, mobile: 367 },
		{ month: 'October', desktop: 532, mobile: 357 },
		{ month: 'November', desktop: 803, mobile: 515 },
		{ month: 'December', desktop: 271, mobile: 149 }
	];

	const chartConfig = {
		desktop: {
			label: 'Desktop',
			colors: {
				light: ['#047857'],
				dark: ['#10b981']
			}
		},
		mobile: {
			label: 'Mobile',
			colors: {
				light: ['#be123c'],
				dark: ['#f43f5e']
			}
		}
	} satisfies ChartConfig;
</script>

<EvilLineChart {data} config={chartConfig} class="h-full w-full p-4">
	<!-- [!code highlight] -->
	<ChartBackground variant="bubbles" />
	<EvilLineChart.XAxis dataKey="month" tickFormatter={(value) => String(value).substring(0, 3)} />
	<EvilLineChart.Legend isClickable />
	<EvilLineChart.Tooltip />
	<EvilLineChart.Line dataKey="desktop" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
	<EvilLineChart.Line dataKey="mobile" strokeVariant="solid" isClickable>
		<EvilLineChart.Dot variant="border" />
		<EvilLineChart.ActiveDot variant="colored-border" />
	</EvilLineChart.Line>
</EvilLineChart>
```

## Custom Variant

Add your own style: define an SVG `<pattern>` and register it as a variant.

1. Add the new name to the `BackgroundVariant` union in `src/lib/registry/ui/layerchart-background/types.ts`.
2. Create a pattern component that returns a `<pattern>` with your SVG shapes.
3. Register the pattern component in `PATTERN_MAP`.

Example custom pattern:

```ts title="src/lib/registry/ui/layerchart-background/types.ts"
export type BackgroundVariant =
	| 'dots'
	| 'grid'
	| 'cross-hatch'
	| 'diagonal-lines'
	| 'plus'
	| 'falling-triangles'
	| '4-pointed-star'
	| 'tiny-checkers'
	| 'overlapping-circles'
	| 'wiggle-lines'
	| 'bubbles'
	| 'custom-pattern';
```

```svelte title="src/lib/registry/ui/layerchart-background/patterns/custom-pattern.svelte"
<script lang="ts">
	let { id }: { id: string } = $props();
</script>

<pattern {id} x="0" y="0" width="24" height="24" patternUnits="userSpaceOnUse">
	<path
		class="text-border dark:text-border"
		d="M12 2l2.2 4.6L19 9l-4.8 2.4L12 16l-2.2-4.6L5 9l4.8-2.4L12 2z"
		fill="currentColor"
		fill-opacity="0.35"
	/>
</pattern>
```

```ts title="src/lib/registry/ui/layerchart-background/pattern-map.ts"
import type { Component } from 'svelte';
import Bubbles from './patterns/bubbles.svelte';
import CrossHatch from './patterns/cross-hatch.svelte';
import DiagonalLines from './patterns/diagonal-lines.svelte';
import DotsPattern from './patterns/dots.svelte';
import FallingTriangles from './patterns/falling-triangles.svelte';
import FourPointedStar from './patterns/four-pointed-star.svelte';
import GridPattern from './patterns/grid.svelte';
import OverlappingCircles from './patterns/overlapping-circles.svelte';
import Plus from './patterns/plus.svelte';
import TinyCheckers from './patterns/tiny-checkers.svelte';
import WiggleLines from './patterns/wiggle-lines.svelte';
import CustomPattern from './patterns/custom-pattern.svelte';
import type { BackgroundVariant, PatternProps } from './types.js';

export const PATTERN_MAP: Record<BackgroundVariant, Component<PatternProps>> = {
	dots: DotsPattern,
	grid: GridPattern,
	plus: Plus,
	bubbles: Bubbles,
	'cross-hatch': CrossHatch,
	'diagonal-lines': DiagonalLines,
	'falling-triangles': FallingTriangles,
	'4-pointed-star': FourPointedStar,
	'tiny-checkers': TinyCheckers,
	'overlapping-circles': OverlappingCircles,
	'wiggle-lines': WiggleLines,
	'custom-pattern': CustomPattern
};
```

Then use it in any chart:

```svelte
<EvilLineChart xDataKey="month" {data} {chartConfig} backgroundVariant="custom-pattern" />
```

> 
  

Tip: Use your logo as a pattern. Swap the SVG shape for an `<image>` pointing to your logo, then control its size and transparency: `<image href="/logo.svg" width="24" height="24" opacity="0.2" />`.



