- {#snippet children({ context })}
-
-
-
+
+
+
-
- {#snippet children({ data })}
-
+
+ {#snippet children({ data })}
+
- {#if data.value != null}
-
-
-
- {/if}
- {/snippet}
-
- {/snippet}
+ {#if data.value != null}
+
+
+
+ {/if}
+ {/snippet}
+
diff --git a/docs/src/examples/components/Calendar/multiple-years.svelte b/docs/src/examples/components/Calendar/multiple-years.svelte
index 3502f63f7..413f673bf 100644
--- a/docs/src/examples/components/Calendar/multiple-years.svelte
+++ b/docs/src/examples/components/Calendar/multiple-years.svelte
@@ -32,36 +32,34 @@
padding={{ top: 20, left: 20 }}
height={450}
>
- {#snippet children({ context })}
-
- {#each range(2021, 2024) as year, i}
- {@const start = new Date(year, 0, 1)}
- {@const end = endOfInterval('year', start)}
-
-
-
-
- {/each}
-
+
+ {#each range(2021, 2024) as year, i}
+ {@const start = new Date(year, 0, 1)}
+ {@const end = endOfInterval('year', start)}
+
+
+
+
+ {/each}
+
-
- {#snippet children({ data })}
-
+
+ {#snippet children({ data })}
+
- {#if data.value != null}
-
-
-
- {/if}
- {/snippet}
-
- {/snippet}
+ {#if data.value != null}
+
+
+
+ {/if}
+ {/snippet}
+
diff --git a/docs/src/examples/components/Calendar/responsive-cell-size-default.svelte b/docs/src/examples/components/Calendar/responsive-cell-size-default.svelte
index e63363b9f..33a46e04e 100644
--- a/docs/src/examples/components/Calendar/responsive-cell-size-default.svelte
+++ b/docs/src/examples/components/Calendar/responsive-cell-size-default.svelte
@@ -36,26 +36,19 @@
padding={{ top: 20 }}
height={140}
>
- {#snippet children({ context })}
-
-
-
+
+
+
-
- {#snippet children({ data })}
-
+
+ {#snippet children({ data })}
+
- {#if data.value != null}
-
-
-
- {/if}
- {/snippet}
-
- {/snippet}
+ {#if data.value != null}
+
+
+
+ {/if}
+ {/snippet}
+
diff --git a/docs/src/examples/components/Chart/data-chart-multi.svelte b/docs/src/examples/components/Chart/data-chart-multi.svelte
new file mode 100644
index 000000000..22e71d71b
--- /dev/null
+++ b/docs/src/examples/components/Chart/data-chart-multi.svelte
@@ -0,0 +1,19 @@
+
+
+
+ {#snippet marks()}
+
+
+ {/snippet}
+
diff --git a/docs/src/examples/components/Chart/data-chart-single.svelte b/docs/src/examples/components/Chart/data-chart-single.svelte
new file mode 100644
index 000000000..f2f672d5e
--- /dev/null
+++ b/docs/src/examples/components/Chart/data-chart-single.svelte
@@ -0,0 +1,18 @@
+
+
+
+ {#snippet marks()}
+
+ {/snippet}
+
diff --git a/docs/src/examples/components/Chart/data-series-chart-data.svelte b/docs/src/examples/components/Chart/data-series-chart-data.svelte
new file mode 100644
index 000000000..0497a72c9
--- /dev/null
+++ b/docs/src/examples/components/Chart/data-series-chart-data.svelte
@@ -0,0 +1,28 @@
+
+
+
+
+
+
diff --git a/docs/src/examples/components/Chart/data-series-separate-data.svelte b/docs/src/examples/components/Chart/data-series-separate-data.svelte
new file mode 100644
index 000000000..4c6877338
--- /dev/null
+++ b/docs/src/examples/components/Chart/data-series-separate-data.svelte
@@ -0,0 +1,37 @@
+
+
+
+
+
+
diff --git a/docs/src/examples/components/GeoPath/animated-globe.svelte b/docs/src/examples/components/GeoPath/animated-globe.svelte
index e47fef053..1bb420f37 100644
--- a/docs/src/examples/components/GeoPath/animated-globe.svelte
+++ b/docs/src/examples/components/GeoPath/animated-globe.svelte
@@ -11,7 +11,7 @@
Layer,
Tooltip,
defaultChartPadding,
- type ChartContextValue
+ type ChartState
} from 'layerchart';
import { Button } from 'svelte-ux';
import { sortFunc } from '@layerstack/utils';
@@ -26,7 +26,7 @@
const topology = await getCountriesTopology();
const countries = feature(topology, topology.objects.countries);
- let context = $state
(null!);
+ let context = $state(null!);
let selectedFeature: (typeof countries.features)[0] | null = $state(null);
@@ -136,44 +136,42 @@
padding={{ ...defaultChartPadding, left: 5, right: 5 }}
height={600}
>
- {#snippet children()}
- {#if debug}
-
-
-
- {/if}
-
-
-
-
-
- {#each countries.features as country (country)}
- (selectedFeature = country)}
- tooltipContext={context.tooltip}
- />
- {/each}
+ {#if debug}
+
+
+
+ {/if}
+
+
+
+
+
+ {#each countries.features as country (country)}
+ (selectedFeature = country)}
+ tooltip
+ />
+ {/each}
+
+
+ {#if layer === 'canvas'}
+
+
+ {#if context.tooltip.data}
+
+ {/if}
+ {/if}
- {#if layer === 'canvas'}
-
-
- {#if context.tooltip.data}
-
- {/if}
-
- {/if}
-
-
- {context.tooltip.data.properties.name}
-
- {/snippet}
+
+ {context.tooltip.data.properties.name}
+
diff --git a/docs/src/examples/components/GeoPath/bubble-map.svelte b/docs/src/examples/components/GeoPath/bubble-map.svelte
index a222df86e..2d7813714 100644
--- a/docs/src/examples/components/GeoPath/bubble-map.svelte
+++ b/docs/src/examples/components/GeoPath/bubble-map.svelte
@@ -110,7 +110,7 @@
{#each enrichedCountiesFeatures as feature}