All Projects → happybeing → d3-fdg-svelte

happybeing / d3-fdg-svelte

Licence: other
d3 Force Directed Graph example (d3-force) implemented in sveltejs. REPL:

Programming Languages

javascript
184084 projects - #8 most used programming language
Svelte
593 projects

Projects that are alternatives of or similar to d3-fdg-svelte

ui-svelte
A component library for Svelte
Stars: ✭ 18 (-41.94%)
Mutual labels:  svelte, sveltejs
hagura-sveltekit
A minimal markdown blog template built using SvelteKit
Stars: ✭ 51 (+64.52%)
Mutual labels:  svelte, sveltejs
svelte-progressbar
A multiseries, SVG progressbar component made with Svelte
Stars: ✭ 85 (+174.19%)
Mutual labels:  svelte, sveltejs
svelte-portal
Svelte component for rendering outside the DOM of parent component
Stars: ✭ 261 (+741.94%)
Mutual labels:  svelte, sveltejs
svelte-datagrid
Svelte data grid spreadsheet best best features and performance from excel
Stars: ✭ 48 (+54.84%)
Mutual labels:  svelte, sveltejs
svelte-webcomponents
A ready-to-use project template to build custom elements (web components) with Svelte 3 with support and examples for web components, jest, sass, nested components with props, eslinting, stylelinting, Github actions, propagating custom events from shadow-DOM to real-DOM etc.
Stars: ✭ 22 (-29.03%)
Mutual labels:  svelte, sveltejs
fa-svelte
Font Awesome 5 for svelte.js
Stars: ✭ 72 (+132.26%)
Mutual labels:  svelte, sveltejs
svelte-typescript-rollup
Svelte + Typescript + Rollup
Stars: ✭ 79 (+154.84%)
Mutual labels:  svelte, sveltejs
fastify-vite
This plugin lets you load a Vite client application and set it up for Server-Side Rendering (SSR) with Fastify.
Stars: ✭ 497 (+1503.23%)
Mutual labels:  svelte, sveltejs
visualisation-lab
An experimental visualisation workbench built using Svelte
Stars: ✭ 17 (-45.16%)
Mutual labels:  svelte, d3js
sveltekit-blog
Sveltekit blog starter project created with sveltekit, typescript, tailwindcss, postcss, husky, and storybook. The project has the structure set up for the scaleable web application.
Stars: ✭ 100 (+222.58%)
Mutual labels:  svelte, sveltejs
kahi-ui
Straight-forward Svelte UI for the Web
Stars: ✭ 169 (+445.16%)
Mutual labels:  svelte, sveltejs
ctx-core
A composable monorepo web-service/front-end toolkit
Stars: ✭ 25 (-19.35%)
Mutual labels:  svelte, sveltejs
svelte-interview-questions
Concepts and Questions related to Svelte - Part of official Svelte resources list
Stars: ✭ 18 (-41.94%)
Mutual labels:  svelte, sveltejs
template
Elder.js template project. It is part template, part tutorial. Dive in!
Stars: ✭ 101 (+225.81%)
Mutual labels:  svelte, sveltejs
Svelte Material Ui
Svelte Material UI Components
Stars: ✭ 2,081 (+6612.9%)
Mutual labels:  svelte, sveltejs
svelte-component-library-template
A base for building Svelte component library.
Stars: ✭ 62 (+100%)
Mutual labels:  svelte, sveltejs
svelte-persistent-store
A Svelte store that keep its value through pages and reloads
Stars: ✭ 111 (+258.06%)
Mutual labels:  svelte, sveltejs
SvelteTetris
Basic Tetris game created with Svelte
Stars: ✭ 21 (-32.26%)
Mutual labels:  svelte, sveltejs
sdk-for-svelte
Appwrite SDK for Svelte 🧡 ⚠️ Warning - this SDK was designed to support Appwrite 0.9 and is not compatible with the latest Appwrite versions. We are planing to refactor it as part of the SDK Generator for better support and maintenance.
Stars: ✭ 69 (+122.58%)
Mutual labels:  svelte, sveltejs

D3 Force Directed Graph in Svelte

This project contains Svelte JS versions of the D3 Force Directed Graph example.

Svelte Implementations

Each Svelte version is implemented as a file/component which can be tested by modifying src/App.svelte to select the one you wish to try. Or you can view the code and a live example using the 'REPL' links below.

  1. NetworkGraphSvelteSVG.svelte - uses Svelte SVG elements (REPL or REPL without d3-zoom*)

  2. NetworkGraphD3SVG.svelte - uses D3 SVG elements (REPL)

  3. NetworkGraphCanvas.svelte - uses canvas with D3 hit detection (REPL or REPL without d3-zoom)

  4. NetworkGraphCanvasIdContext.svelte - uses canvas with a second context for hit detection (REPL or REPL without d3-zoom)

    * In (1) without zoom, I've added some axes but that's the only visual difference.

Performance

It will be interesting to see how the alternative hit detection methods of (3) and (4) compare. The former uses D3 simulation.find() while (4) uses a second idContext (drawing all the nodes a second time and using the colour of any hit to determine which node was hit).

Work to compare performance of the above can be found in d3-fdg-svelte-perf

Touch Screens

All should work with laptop, mobile and tablet touch screens (tested with Chrome and Firefox on Ubuntu and Android) but note:

It can be hard to hit the nodes with a fat finger on a small screen, so if you want to test or support mobile devices, you may have to enlarge the hit radius when the display is a small screen.

Get started

The conversions are based on the default sveltejs/template, so refer to that for more information. Note though, I have modified it to use yarn rather than npm, so the essential commands are given below.

Note that you will need to have Node.js and yarn installed.

Get the code...

git clone https://github.com/theWebalyst/d3-fdg-svelte

Install the dependencies...

cd d3-fdg-svelte
yarn

...then start Rollup:

yarn dev

Navigate to localhost:5000. You should see the app running.

More information

For more information about the template used to create this app, see the README at https://github.com/sveltejs/template.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].