Skip to content

Commit 07f7c07

Browse files
committed
docs: add stacked unit chart example
1 parent 8e106d5 commit 07f7c07

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<script module>
2+
export let title = 'Stacked Unit Chart';
3+
</script>
4+
5+
<script>
6+
import { BarX, Plot } from 'svelteplot';
7+
import { page } from '$app/state';
8+
let { penguins } = $derived(page.data.data);
9+
</script>
10+
11+
<Plot
12+
marginLeft={60}
13+
x={{ label: 'Frequency →' }}
14+
y={{ label: null }}
15+
color={{ legend: true }}>
16+
<BarX
17+
data={penguins}
18+
y="species"
19+
x={1}
20+
inset={0.5}
21+
fill="body_mass_g"
22+
sort="body_mass_g" />
23+
<RuleX data={[0]} />
24+
</Plot>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy