Skip to content

Commit 74b06f2

Browse files
committed
docs
1 parent d8e741c commit 74b06f2

File tree

1 file changed

+6
-13
lines changed
  • src/routes/features/interactivity

1 file changed

+6
-13
lines changed

src/routes/features/interactivity/+page.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Pointer mark
3232
lineAnchor="bottom"
3333
fontWeight="bold"
3434
dy="-10" />
35-
<Dot {data} x="Date" y="Close" fill />
35+
<Dot {data} x="Date" y="Close" fill="var(--svp-red)" />
3636
{/snippet}
3737
</Pointer>
3838
</Plot>
@@ -91,8 +91,8 @@ You can create a "crosshair" mark
9191
y="Close"
9292
maxDistance={30}>
9393
{#snippet children({ data })}
94-
<RuleX {data} x="Date" opacity="0.3" />
95-
<RuleY {data} y="Close" opacity="0.3" />
94+
<RuleX {data} x="Date" opacity="0.5" stroke="var(--svp-red)" />
95+
<RuleY {data} y="Close" opacity="0.5" stroke="var(--svp-red)" />
9696
<AxisX
9797
data={data.map((d) => d.Date)}
9898
tickFormat={(d) => d.getFullYear()} />
@@ -104,7 +104,7 @@ You can create a "crosshair" mark
104104
</Plot>
105105
```
106106

107-
PointerY
107+
Pointer along the y axis:
108108

109109
```svelte live
110110
<script>
@@ -124,7 +124,7 @@ PointerY
124124
<Line data={aapl} x="Date" y="Close" />
125125
<Pointer data={aapl} y="Close" maxDistance={30}>
126126
{#snippet children({ data })}
127-
<RuleY {data} y="Close" opacity={0.2} />
127+
<RuleY {data} y="Close" opacity="0.5" stroke="var(--svp-red)" />
128128
<Text
129129
{data}
130130
fill="currentColor"
@@ -215,7 +215,7 @@ Pointer along the x dimension
215215
<RuleX
216216
data={data.length ? [data[0]] : []}
217217
x="Date"
218-
opacity={0.2} />
218+
opacity="0.5" stroke="var(--svp-red)" />
219219
<Text
220220
{data}
221221
fill="Symbol"
@@ -349,13 +349,6 @@ You can even put another tiny plot inside the HTML tooltips:
349349
import { Plot, Dot, HTMLTooltip, BarX } from 'svelteplot';
350350
import { page } from '$app/state';
351351
let { penguins } = $derived(page.data.data);
352-
353-
const speciesImages = {
354-
Adelie: 'https://upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Hope_Bay-2016-Trinity_Peninsula%E2%80%93Ad%C3%A9lie_penguin_%28Pygoscelis_adeliae%29_04.jpg/346px-Hope_Bay-2016-Trinity_Peninsula%E2%80%93Ad%C3%A9lie_penguin_%28Pygoscelis_adeliae%29_04.jpg',
355-
Chinstrap:
356-
'https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/A_chinstrap_penguin_%28Pygoscelis_antarcticus%29_on_Deception_Island_in_Antarctica.jpg/201px-A_chinstrap_penguin_%28Pygoscelis_antarcticus%29_on_Deception_Island_in_Antarctica.jpg',
357-
Gentoo: 'https://upload.wikimedia.org/wikipedia/commons/thumb/1/13/00_0304_Gentoo_Penguins.jpg/160px-00_0304_Gentoo_Penguins.jpg'
358-
};
359352
</script>
360353
361354
<Plot grid height={500}>

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