Skip to content

Commit

Permalink
Do not set original xDomain example outside of data
Browse files Browse the repository at this point in the history
  • Loading branch information
techniq committed Jun 3, 2024
1 parent 3ca195c commit 18a6100
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
export let data;
const now = new Date();
let xDomain = [subDays(now, 100), subDays(now, 80)];
let xDomain = [subDays(now, 60), subDays(now, 30)];
const seriesData = [
randomWalk({ count: 100 }).map((value, i) => ({ date: subDays(now, i), value: 10 + value })),
Expand Down Expand Up @@ -312,6 +312,7 @@
'var(--color-warning-500)',
'var(--color-danger-500)',
])}

<div class="grid grid-cols-2 gap-4">
{#each seriesData as data, i}
<div class="border rounded p-4 grid gap-1" style:--chart-color={colorScale(i)}>
Expand Down

0 comments on commit 18a6100

Please sign in to comment.