evidence team: what's the best tutorial you've fou...
# random
r
evidence team: what's the best tutorial you've found on building basic data viz components in svelte? i know that was part of its original purpose, but i haven't quite fully grokked how that typically works. thanks for any pointers!
b
I wish I had a more complete written guide to point to, since I do think building a custom component here or there is one of the fun things about Evidence. Folks who are building custom viz using svelte are usually using D3 alongside it. Here’s an overview on that: https://blog.logrocket.com/data-visualization-svelte-d3/ Amelia Wattenberger has a great book on D3 called full stack D3, and some content on the combo with svelte. I haven’t watched this but it looks promising:

https://youtu.be/3n0vU9YtDsg

https://svelte.recipes/ is also from her.
r
okay really helps already to know it's mostly acting as a container for D3, i can grok that!
i thought perhaps Rich built it to like, build, manipulate, and style DOM elements directly and i was like 🤯
(i built my personal site with sveltekit so i have some basic sense of svelte, and enjoy it a lot)
b
Oh epic
r
b
This is old, but might be interesting for some ideas — Rich started in on a charting library type of thing himself, before being swept full time into getting sveltekit off the ground: https://pancake-charts.surge.sh/
r
i found that! it's really cool and i think that's where i got some of my confusing ideas from, i wish he would make that a proper thing
💯 1
b
Your site is super nice. Really like the serif and the “highlighter” link style
❤️ 1
r
tyyy i definitely spent way too much time picking fonts, but it seems to have paid off. that's Fanwood from Google Fonts, very Tufte-ian i think!
g
@rapid-grass-65397 our original charting library for Evidence was based on that svelte/D3 mix. D3 basically just for their scale and other helper functions, and then svelte for building svg elements. It's really cool in svelte to be able to loop through data to build up the graphic elements. I remember this video being helpful:

https://www.youtube.com/watch?v=gvvVzyDglzc&list=PL8bMgX1kyZTgFJrYW-_rJdL5v-LlCAQAr

🙌 2
b
Matthias Stahl just open sourced the viz from this article. Done with svelte, of course 😉 Super inspiring. tweet Repo