You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/routes/why-svelteplot/+page.md
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Why SveltePlot?
3
3
description: Why do we need yet another Svelte visualization framework?
4
4
---
5
5
6
-
SveltePlot combines the concise API and concepts of Observable Plot with Svelte reactivity. It is not just a Svelte-wrapper, but re-implemented from scratch on top of D3. But what makes SveltePlot better than the existing visualization frameworks in Svelte?
6
+
SveltePlot combines the concise API and concepts of [Observable Plot](https://observablehq.com/plot/) with [Svelte](https://svelte.dev/) reactivity. It is not just a Svelte-wrapper, but re-implemented from scratch on top of [D3](https://d3js.org/). But what makes SveltePlot better than the existing visualization frameworks in Svelte?
7
7
8
8
## Layered grammar of graphics
9
9
@@ -93,7 +93,7 @@ You can think of marks as the building blocks for your visualizations -- or the
This makes it a lot easier to iterate over different ideas for visualizations. For instance, if we want to combine the dot plot above with a line chart, we can just throw in a Line mark as extra layer.
96
+
This makes it a lot easier to iterate over different ideas for visualizations. For instance, if we want to combine the dot plot above with a line chart, we can just throw in a [Line mark](/marks/line) as extra layer.
97
97
98
98
```svelte live
99
99
<script>
@@ -149,7 +149,7 @@ This makes it a lot easier to iterate over different ideas for visualizations. F
149
149
</Plot>
150
150
```
151
151
152
-
And if we wanted to add uncertainty ranges, we can add a rule mark as well.
152
+
And if we wanted to add uncertainty ranges, we can add a [Rule mark](/marks/rule) as well.
153
153
154
154
```svelte live
155
155
<script>
@@ -244,7 +244,7 @@ Take the following example, where you can filter the data using the [filter](/tr
244
244
</Plot>
245
245
```
246
246
247
-
Here's an example where we're binding a live-updated dataset to a line mark. Note how the `<path>` elements rendering the line and area get re-used, and ticks and grid lines get moved around instead of being re-created on every frame:
247
+
Here's an example where we're binding a live-updated dataset to a [Line mark](/marks/line). Note how the `<path>` elements rendering the line and area get re-used, and ticks and grid lines get moved around instead of being re-created on every frame:
248
248
249
249
```svelte live
250
250
<script lang="ts">
@@ -336,6 +336,7 @@ Here's an example where we're binding a live-updated dataset to a line mark. Not
Also, simply by being a Svelte framework, SveltePlot can support tweens and transitions! In the following plot, we're using the [Tween state](https://svelte.dev/docs/svelte-motion#Tween) from `svelte/motion` to smoothly update the vertical domain whenever the data changes.
339
+
Try clicking on the bars to change their values.
339
340
340
341
```svelte live
341
342
<script>
@@ -400,7 +401,7 @@ Also, simply by being a Svelte framework, SveltePlot can support tweens and tran
400
401
401
402
## Easy to extend
402
403
403
-
You can extend SveltePlot by injecting regular Svelte snippets. For instance, the Line mark allows you to provide custom markers by passing a `marker` snippet. So why no use animated line markers, just because we can?
404
+
You can extend SveltePlot by injecting regular Svelte snippets. For instance, the [Line mark](/marks/line) allows you to provide custom markers by passing a `marker` snippet. So why no use animated line markers, just because we can?
404
405
405
406
```svelte live
406
407
<script lang="ts">
@@ -493,4 +494,4 @@ You can extend SveltePlot by injecting regular Svelte snippets. For instance, th
493
494
494
495
## Built on top of D3
495
496
496
-
Like its inspiration Observable Plot, SveltePlot is built on top of D3.
497
+
Like its inspiration Observable Plot, SveltePlot is built on top of [D3](https://d3js.org/).
0 commit comments