Need advice about which tool to choose?Ask the StackShare community!

D3.js

1.8K
1.7K
+ 1
653
Svelte

1.5K
1.5K
+ 1
493
Add tool

D3.js vs Svelte: What are the differences?

  1. Data Binding: D3.js relies heavily on data binding, where data values are connected to elements in the DOM to dynamically update the visualization based on changes in the data. Svelte, on the other hand, uses a reactive declaration syntax for data binding, which simplifies the process by automatically updating the DOM when the data changes.
  2. Component Architecture: D3.js is a library for manipulating documents based on data and primarily focuses on SVG elements for creating visualizations. In contrast, Svelte is a full-fledged framework that supports building components with reusable code and encapsulated styles, making it easier to manage complex applications.
  3. Performance: D3.js renders visualizations directly to the DOM, which can sometimes lead to performance issues when dealing with large datasets or complex animations. Svelte, on the other hand, compiles components into highly optimized vanilla JavaScript code during build time, resulting in faster rendering and improved performance.
  4. Learning Curve: D3.js has a steep learning curve due to its low-level API and complex concepts like enter-update-exit pattern for data binding. Svelte, on the other hand, offers a more intuitive and beginner-friendly syntax with reactive declarations and built-in state management, making it easier for developers to create interactive web applications.
  5. Bundle Size: D3.js is a comprehensive library with a large file size, requiring developers to selectively import only the modules they need to reduce bundle size. In contrast, Svelte's compiler analyzes and optimizes the code during build time, resulting in smaller bundle sizes and faster load times for web applications.
  6. Community Support: D3.js has a strong and active community with a wealth of resources, tutorials, and examples available online. Svelte, being a relatively newer framework, is gradually gaining popularity and community support, but may have fewer resources compared to D3.js.

In Summary, D3.js is more focused on data visualization and manipulation through the DOM, while Svelte provides a framework for building reactive and performant web applications with a simpler syntax and optimized bundle size.

Decisions about D3.js and Svelte
Máté Homolya
Senior developer at Self-employed · | 11 upvotes · 278.1K views
Migrated
from
ReactReact
to
SvelteSvelte

Svelte is everything a developer could ever want for flexible, scalable frontend development. I feel like React has reached a maturity level where there needs to be new syntactic sugar added (I'm looking at you, hooks!). I love how Svelte sets out to rebuild a new language to write interfaces in from the ground up.

See more
Alex Guesnon
Full-stack software engineer · | 3 upvotes · 113.3K views
Chose
SvelteSvelte
over
Vue.jsVue.js

Svelte 3 is exacly what I'm looking for that Vue is not made for.

It has a iterable dom just like angular but very low overhead.

This is going to be used with the application.

for old/ lite devices . ie. * android tv, * micro linux, * possibly text based web browser for ascci and/or linux framebuffer * android go devices * android One devices

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of D3.js
Pros of Svelte
  • 195
    Beautiful visualizations
  • 103
    Svg
  • 92
    Data-driven
  • 81
    Large set of examples
  • 61
    Data-driven documents
  • 24
    Visualization components
  • 20
    Transitions
  • 18
    Dynamic properties
  • 16
    Plugins
  • 11
    Transformation
  • 7
    Makes data interactive
  • 4
    Open Source
  • 4
    Enter and Exit
  • 4
    Components
  • 3
    Exhaustive
  • 3
    Backed by the new york times
  • 2
    Easy and beautiful
  • 1
    Highly customizable
  • 1
    Awesome Community Support
  • 1
    Simple elegance
  • 1
    Templates, force template
  • 1
    Angular 4
  • 56
    Performance
  • 39
    Reactivity
  • 34
    Components
  • 34
    Simplicity
  • 34
    Javascript compiler (do that browsers don't have to)
  • 30
    Lightweight
  • 28
    Near to no learning curve
  • 26
    Fast as vanilajs
  • 26
    Real Reactivity
  • 22
    All in one
  • 18
    Compiler based
  • 18
    Use existing js libraries
  • 16
    SSR
  • 16
    Very easy for beginners
  • 16
    Scalable
  • 13
    Composable
  • 12
    Ease of use
  • 12
    No runtime overhead
  • 10
    Built in store
  • 9
    Typescript
  • 7
    Best Developer Experience
  • 7
    Start with pure html + css
  • 6
    Templates
  • 4
    Speed

Sign up to add or upvote prosMake informed product decisions

Cons of D3.js
Cons of Svelte
  • 11
    Beginners cant understand at all
  • 6
    Complex syntax
  • 3
    Event Listener Overload
  • 2
    Little to no libraries
  • 2
    Complex
  • 2
    Learning Curve
  • 2
    Hard to learn

Sign up to add or upvote consMake informed product decisions

What is D3.js?

It is a JavaScript library for manipulating documents based on data. Emphasises on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework.

What is Svelte?

If you've ever built a JavaScript application, the chances are you've encountered – or at least heard of – frameworks like React, Angular, Vue and Ractive. Like Svelte, these tools all share a goal of making it easy to build slick interactive user interfaces. Rather than interpreting your application code at run time, your app is converted into ideal JavaScript at build time. That means you don't pay the performance cost of the framework's abstractions, or incur a penalty when your app first loads.

Need advice about which tool to choose?Ask the StackShare community!

What companies use D3.js?
What companies use Svelte?
See which teams inside your own company are using D3.js or Svelte.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with D3.js?
What tools integrate with Svelte?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

JavaScriptGitHubReact+12
5
4133
Sep 8 2017 at 2:54PM

Eventbrite-0

JavaScriptNode.jsReact+7
6
9777
What are some alternatives to D3.js and Svelte?
three.js
It is a cross-browser JavaScript library and Application Programming Interface used to create and display animated 3D computer graphics in a web browser.
Plotly.js
It is a standalone Javascript data visualization library, and it also powers the Python and R modules named plotly in those respective ecosystems (referred to as Plotly.py and Plotly.R). It can be used to produce dozens of chart types and visualizations, including statistical charts, 3D graphs, scientific charts, SVG and tile maps, financial charts and more.
Highcharts
Highcharts currently supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
Tableau
Tableau can help anyone see and understand their data. Connect to almost any database, drag and drop to create visualizations, and share with a click.
See all alternatives